It needs a very complex algorithm unlike buses and flights. The main reason for not allowing passengers to book their own preferred seats in railways is balancing factor. Improper allocation of passengers in trains will lead to imbalance due to unequal weight distribution at curves and cause accidents.