I'm a big fan of small cars, and on those I personally find just one passenger door on each side to be a lot more aesthetically pleasing. Think along the lines of your Citroen Saxo, Ford Fiesta, Peugeot 106/206, Renault Clio Mk1/2, Suzuki Swift, Toyota Aygo/Yaris etc. The four door versions of these smaller cars I think look too 'busy' on the side with the doors and lines squashed on, where as the two door ones look a lot 'cleaner'. I do however get the fact they aren't as practical (particularly if you regularly use the rear seats) and have to admit that on occasions even a small two door car fan like myself has sometimes thought a rear door might be handy, and the longer length doors you get on two door cars can also make it slightly harder to squeeze in if someone has parked closely alongside as you can't open them as wide at the bit alongside your driver's seat. In general life though, I like them.
On even only slightly larger cars though, I don't think two doors look as good. The likes of the BMW 3 Series, Ford Focus, Vauxhall Astra etc I think look a lot better with four passenger doors. I have noticed as some of the two door cars have grown with each later generation, some manufacturers have 'hidden' the rear door handles behind the rear window glass. This may well be for streamlining but it also has the effect of making them look more like two door cars. Examples of this include later generations of the Nissan Micra (2016 onwards), Renault Clio (2012 onwards) and Suzuki Swift (2016-2023, as the latest version seems to have regained conventional rear door handles). Because the front doors are the shorter length needed to accommodate the rear doors, I find this two door car look appears 'awkward' with extra long blank rear half of the car.
So in short, I can only think - as mentioned by other posters - the reasons must be down to cost and aesthetic (although the latter point is clearly down to personal taste rather than any kind of fact). They almost certainly don't win when it comes to overall practicality, and I'm not sure if resale value takes - or rather took, given how rare two doors on common everyday car models are - a bigger dive than four door cars if the majority of people now prefer the practicality offered by four doors?