There is a technical reason behind the fact that IRCTC does not allow us to book tickets according to our preference, and the problem behind this is very practical. Reserving a seat in a train is far more different than booking a seat in a theatre. Theatre is a hall, where as train is a moving object, so safety concern is very high in trains. Indian railways ticket booking software is designed in such a way that it will book tickets in a manner that will distribute the load evenly in a train.
For example: Imagine there are sleeper class coaches in a train numbered S1, S2 S3 till S10, and in every coach there are 72 seats. So when a commuter first books a ticket, software will assign a seat in the middle coach like S5, middle seat numbered between 30-40, and preferably lower berths. Railways first fills the lower berths than the upper one so as to achieve low centre of gravity, a scientific solution to allotting berths. And the software books seats in such a way that all coaches have uniform passenger distribution and seats are filled starting from the middle seats (36) to seats near the gates i.e 1-2 or 71-72 in order from lower berth to upper. Railways just want to ensure a proper balance that each coach should have for equal load distribution. That is why when you book a ticket in last you are always allotted an upper berth and a seat numbered around 2-3 or 70.
What will happen if the railways book tickets randomly? A train moves around at a speed of around 100km/hr on rails. So there are a lot of forces and mechanics acting on the train. Just imagine If S1, S2, S3 are completely full and S5, S6 are fully vacant and others are partially full, so when the train takes a turn, some coaches face maximum centrifugal force and some minimum, and this creates a high chance of train derailment. This is a very technical aspect, and when brakes are applied there will be different braking forces acting at each of the coaches because of the huge differences in weight of coach, so stability of train becomes an issue again.
There are many forces acting on moving objects. Dynamics of a moving body is completely different from a stationary one. So it is always hard to understand a moving object. And yes there are technical solutions to this problem. Like we have developed double-decker trains which is an achievement in itself, because it achieves a very high center of gravity. As a public convenience mode Railways will have to follow Physics, dynamics and Centrifugal force to ensure safety of passengers in the best way possible and in a very balanced way.
(The views expressed by the author in the article are his/her own.)