Such locations, which can also be bus stations and ferry ports, are known as "intermodal locations".
TL;DR its for ticketing purposes to enable flight and rail/bus/ferry legs to be issued on the same ticket.
Or at least that's the theory. To be honest its probably going be extinct in due course, given the complexities of integrating the airline world with the modern private railways etc. In most cases its just easier and more sensible to ticket seperateley. Plus some of the quaint old-fashioned things such as being able to check-through bags are becoming few and far between due to security and other aspects (e.g. disappearance of station porters and baggage cars).