In meteorology, the atmosphere is considered to be divided into air masses, regions of relatively uniform temperature and humidity with fronts on their borders. But why doesn't the air from different air masses mix together when they meet? I can't find the answer in any weather book, and nobody seems to ask. People just accept the answer that different densities don't readily mix.
There's always a reason although for different weather fronts, the discussion has to be different.
Different densities have to have a reason - different pressure and/or humidity etc. If there is a different pressure, there is a mechanical force that preserves the pressure difference: think about the cyclones that have a lower pressure in the center. The cyclones rotate in the right direction and the cyclone may be preserved by the Coriolis force.
If the two air masses differ by humidity, the mixing will almost always lead to precipitation - which includes a phase transition for water etc. It's because the vapor from the more humid air mass gets condensed under the conditions of the other. You get some rain. In general, intense precipitation, thunderstorms, and other visible isolated weather events are linked to weather fronts.
At any rate, a mixing of two air masses is a nontrivial, violent process in general. That's why the boundary is called a "front". In the military jargon, a front is the contested frontier of a conflict. So your idea that the air masses could mix quickly and peacefully - whatever you exactly mean quantitatively - either neglects the inertia of the air, a relatively low diffusion coefficient, a low thermal conductivity, and/or high latent heat of water vapor. A front is something that didn't disappear within minutes so pretty much tautologically, there must be forces that make such a quick disappearance impossible.
The shape of the clouds etc. is complicated and meteorological models are not capturing them nicely. And I surely don't plan to defend long-term climate models whose predictions are uncorrelated to the reality, and they usually turned out to be negatively correlated, in fact. But I assure you that the meteorological models used to forecast weather for the next weak deal with the weather fronts - they are among the main entities that these models have to deal with - and predict them in a satisfactory way, at least at a qualitative level, while using well-known laws of physics only.
I would like to add a few points to the other answer. The question could be taken to be asking why the Earth's atmosphere consists of the thermodynamic equivalent of "domains". That is why are there different regions (of homogeneous parameter values) with discontinuities between those regions? These regions here being the "air masses" - defined as having a homogeneous temperature and humidity - which are listed on the Wiki articles.
It should be noted that any question about the atmosphere is a question covering many areas of physics: thermodynamics, turbulence, chemical processes. As a turbulent system the atmosphere is not in equilibrium and so, for example, does not have a constant temperature, or even a constant temperature gradient across either time or surface. It is in somewhat of a steady state with the Solar energy, however, and this results in the atmospheric equivalent of large eddies.
As the Wiki article explains the "air mass" regions are actually maintained at their temperature and humidity by their underlying ground structure and vegetation. According to that diagram too, the air mass regions are actually physically separated from each other. So they will only interact when the air above one of them moves near to the territory of another. Part of the cause of this movement will be the Earth's rotation and its consequences in circulation.
Now by definition an air mass region has a given Temperature and Humidity. But Humidity is really a measure of the air-water mix and so the "gas" (ie gaseous state) of each region is different. Put differently the chemical composition of the two regions is different, as well as their temperature. Now one factor that arises is that more humid air is less dense than less humid air (originally discovered by Newton apparently). Another factor is that humidity (absolute and relative) can double with a mere $10^o$ temperature change, resulting in saturation or near saturation. We also have that lower temperature air can contain less water than higher temperature air.
So in regions with different (T, H) levels it has to be thermodynamically attractive for them to mix immediately, and the scenario described above is not looking promising... Basically the warmer air (being less dense and maybe with more water) will rise above the colder air rather than just mix. Unfortunately this has consequences for those on the ground nearby. The momentum of the colder denser air also keeps it moving in its original direction somewhat intact.
Hopefully on other planets they do things differently.
They do in fact mix, although because of the time scale it may be reasonable mental simplification to treat them as if they don't. Meterologists speak of frontogenesis, and frontolysis, which is the creation and death of weather fronts. Fronts as ideal stepfunction changes in air properties don't actually exist, but steep gradients do. Usually there is some dynamic inhibiting mechanical mixing, such as denser air underneath lighter air. But even in that case, you would still have diffusion working to lessen the gradients.