> there are a lot of people who actually use the stations between, say, Berlin and Cologne
Sure, and a stop in the middle would make sense on that length of route, or alternating at which intermediate place(s) it stops. But with a stupid rule like having to stop in whatever state you pass means that you have to build rails around to avoid hitting a corner where nobody lives anyway because you'd have to stop for absolutely no reason.
Let the trains make stops and rails be laid based on, like you say, demand. Not on arbitrary border lines.