It certainly isn't the case that the trains stop at the first station before turning back. Even a quick mock up city demonstrates this as per below;
This is in a city plot that has one rail track leading into the city, which I have then extended along the top edge of the map and placed a train station in the top left and top right of the map.
The train will arrive in the city, go straight through the closest station to the station at the end of the line, pick up passengers, and then stop at the other station on the way out of the city to pick up more passengers.
Best guess is that there is another issue causing this problem, most likely relating to how the AI is routing the trains around. There are multiple instances of other similar issues where resources were not correctly moved around the map because of the game's priority system or you've simply got too many passengers going to one station and not enough passengers heading to the other.