In Europe, railway carriages have had two types of layout: coach-style big room with plenty of seats or compartment cars with a side corridor giving access to small, usually 6-seat or 8-seat compartments. This is for day trains; overnight sleeper services are not covered here.
While eastern countries still have the compartment versions running and refurbished (like in Poland for instance), most western countries are phasing out the compartments in their newer trains.
This is the case in France (old former-intercity coaches now used on regional services only have those) and in Germany for instance (refurbishments of ICE trains are taking away the compartments and replace them by coach-style seating).
Interestingly, some railway companies make a new version of the comparments, but make them a premium product above regular 1st class (like OBB Railjet Business in Austria, Club / Executive in Italian high speed trains) in comparison to something that was available to all classes of travel.
Compared to coach-style seating, I found some amenities in train compartments that made the trips more enjoyable, such as:
Light switch. Turning that bright light off, especially during early or late hours, makes it easy to get some rest. It is also practical when leisurely watching a movie on a laptop. In general, I like to travel with dim lights or no lights at all depending on the situation. When travelling at night, it is easier to view the scenery outside as well when the light does not reflect into the window.
Long row of seats. When the train is not full, one can raise the armrests and lie flat to sleep.
Door separation with the corridor. Reduces overall rolling noise. In addition, it allows to be a little noisy at times (loud talking with friends, phone calls) without disturbing the entire carriage.
Why is this trend going on? Is there something that most travellers dislike with compartments?