I wonder why the centre of Crewe is quite a distance from the station, given that it is a town almost entirely created by the railway. Whereas the historic core of Swindon is very close to the station.
Quite possibly just due to the different way the towns and works were laid out, and how the towns have grown since the decline of the works.
Is being out of the city centre necessarily a bad thing, though? It's easier to deal with all the car and taxi traffic that a major station generates.
It will vary from city to city of course but you would want the station to be close enough to the major destinations that people could walk, to minimise on the traffic that needed to be handled. Very few stations are actually in the historic centres proper though, with Newcastle (upon Tyne) being a notable exception along with a few of the London Termini, but even the major stations like Leeds, York, Manchester Picc/Airport, Liverpool Lime Street, etc are built on the edge of the city as was and then later subsumed into the city by expansion.
A similar tale can be told with roads though - Euston road was originally built as a sort-of bypass-cum-distributor road away from the edge of London, then it became the boundary (which is why there's 3 stations on it), and now it's very much part of the city.