Whiennauwai55 I was late so I thought I would not make it, but the train was late too so I ended up being able to get in the train just in time.
What would you have done had you not made the train?
I think you are mistakingly assuming that a ticket is for a train, and that therefor you must know which train you will take before buying the ticket. Tickets are however for a route, not a train. So there is no reason to wait till the last moment with buying one. You can buy your ticket in advance, not know if you will be able to take that particular train, and if you end up not taking it, you take a later one.
In many other countries you would not have been able to get on the platform without a ticket. That you must buy the ticket before boarding is the rule pretty much everywhere. And that the rule is trictly enforced is the price we pay for having a system that has no gates, that has flexible tickets, and frequent service.