The border crossing and customs take over three hours because the wheels of the train need to be changed at the border due to the rail gauge difference between the two countries. The USSR had different width rail tracks from the rest of Europe as a defence measure to prevent European trains from being able to cross its borders apparently. Moldova used to be part of the USSR, Romania wasn't. The wheel change involves lifting each of the carriages up one by one (with all the passengers still inside them) and, well, changing the wheels. I think that provides for a very rare opportunity to move vertically up in a train carriage.
Here you can see the wheels waiting for the next train at the "wheel changing station" at the border: