Is passport number really necessary? Can I change passport details it after purchasing tickets?

Yes, passport numbers are required. Airlines and many other operators do require it to complete the booking. You also need to show your passport when you pick up your Thai train tickets.
However, if you need to change the passport details after purchasing the tickets, you can do it for all bus, van and ferry operators. You can also change the passport details for train bookings. The airlines are more strict about passport details and will not allow changing the details, or will require paying a fee.

Tags: Thailand, Thai Railways

Thai Railways

OK

I don't have a booking number. I have not purchased a ticket yet.