Triple Dome tank cars, while not as common as single-domes, are a railroad staple. They have been around since the first half of the 20th century.
The dome above tank cars serves as an expansion chamber as temperature affects the volume of any liquids contained within. With no dome, if the liquid did not 100% fill the tank, then it is possible for the liquid to slosh around inside the tank, causing instability and increasing the possibility of a derailment. The dome allows the tank to be slightly overfilled so that should the volume in the main section decrease due to colder temperatures or even a small leak, that there will still be sufficient liquid within to prevent sloshing. Similarly if temperature increases, the liquid can rise up inside the dome preventing excess pressure within the tank. While not as serious as an underfilled tank, an over-pressurized tank might present problems during unloading.
If you see three domes on a tank car it is because there are three separate compartments inside the tank car each containing a different liquid. This was desirable for many reasons.
Often times a delivery would consist of much less than a carload (LCL) of liquid. Remember the sloshing problem? So if you only had to fill a third of a tank with your commodity, then you can avoid the issue by using one of the three chambers within the tank car. Also, you might have several grades of a commodity to deliver such as unleaded, leaded and diesel fuel and you need them to be kept separate. Or you might be producing wine and you want your white wine kept separate from your red wine. Or maybe all three chambers had the same contents but were being delivered to three different customers. It can be very difficult to determine when one third of a single dome tank car has been discharged...
For all these reasons, three-dome tank cars were a common sight in the first half of the 20th century. However, with the rise of the interstate highway system and the modern trucking industry, LCL deliveries have primarily been accomplished with tanker trucks instead of tank cars and the three-dome tank car has gradually disappeared from the North American rail network.