It is understandable jet engines couldn't have mufflers, but even long before the jet age, airplane piston engines never had mufflers the way cars do. Is there any specific reason?
Today, most GA aircraft in Europe do have mufflers so they can pass the ever more stringent noise requirements. Here is one mounted to a Cessna 172 (picture source):
Historically, mufflers were considered as a disadvantage because they reduce engine performance by increasing back pressure. By partially blocking the exhaust flow, the muffler increases cylinder pressure on the last upstroke of the cycle (the exhaust stroke) so it faces more resistance against moving up. Also, more of the burnt gasses remain in the cylinder so less fresh fuel-air mixture can be ingested in the next cycle. At most, in aircraft with an open cockpit a tube was installed to duct the exhaust gasses away from the pilot. Below is a picture of a Mercedes D.IIIa in a Fokker D VII (source):
However, night flying would make aircraft easily detectable by their exhaust flames, so in WW II tubes were added to the exhaust stack in order to avoid optical detection. Below is a picture of an Avro Lancaster with Bristol Hercules engines (source):
Our much better understanding of piston engines now allows to design mufflers which do not cause much power loss and in case of a tuned resonance muffler you even get more power at the design speed because a reflected pressure wave will arrive from the muffler at the exhaust port just when the valves close and will increase cylinder pressure. However, given the low RPM speeds of our old-fashioned aviation piston engines, those mufflers need to be large and the equally old airframe designs have no space for them. So in aviation the mufflers are still causing a power loss.
The direct answer to the question you asked is that there's usually much more separation between an operating aircraft and almost anybody else who might hear it, so noise simply doesn't matter nearly as much as it does with something like a car that frequently operates within, say, a meter of other cars and pedestrians, and often only a few tens of meters from houses, offices, hospitals, etc.
On the other hand, I do feel obliged to point out that contrary to popular belief, an exhaust system can reduce noise levels without causing loss of power--in fact, a properly designed system can actually increase power in many cases, especially some that are quite applicable to most aircraft.
Just for example, a simple tuned expansion chamber typically looks roughly like two cones with their large ends welded together. It helps increase power output fairly simply.
When the engine's exhaust value opens, exhaust starts to flow out of the exhaust port (being pushed fairly quickly by the piston). That means we a have a stream of fairly dense exhaust moving away from the exhaust port at fairly high speed.
When the exhaust port closes, that exhaust gas keeps moving away from the port, leaving a partial vacuum behind it.
In an "open pipe" exhaust system, atmospheric air flows into fill the vacuum very quickly, so by the time the exhaust port opens again, the exhaust gas has to "push" the air out of the way to flow out of the port.
With a tuned exhaust system, we have a pipe (of some sort) near the exhaust port to keep air from the atmosphere from just filling the vacuum next to the port. The dual cone expansion chamber does more than that though: it's designed so the dense exhaust gas bounces off the far end of the chamber, and back toward the port. It gets back to the port end of the chamber, and bounces off it again so it's now moving away from the exhaust port.
What we're shooting for is that the partial vacuum behind the dense exhaust gas is just outside the engine's exhaust port just as the exhaust valve opens. When this happens, that partial vacuum is actually helping to "suck" the next "pack" of exhaust gas out of the combustion chamber.
As to this helping reduce noise: the noise from the exhaust is basically because of the "packs" of compressed exhaust gas followed by rarified air immediately following. With the tuned chamber, we're letting the next pack of compressed exhaust "fill" in that partial vacuum. As a result, the gas flowing out of the exhaust has a much more consistent pressure.
As to why this is particularly applicable to aircraft: mostly because in an aircraft the engine's speed is much more predictable most of the time. Unlike something like a car, most aircraft are basically designed around a cruising speed, and spend the vast majority of their time operating within a fairly narrow range of engine RPM, so it's fairly easy to design an expansion chamber for that speed, with minimal consideration for other speeds.
Propellers often run at a high enough RPM that the tips of the blades exceed the speed of sound. Ever notice that a prop-plane is extremely loud at take off, but very quiet on landing? Supersonic blade tips made mini sonic-booms.
Our ear hears an 'angry snarl' sound. Not the engine, not all the time. This is why a 5-bladed prop is somewhat quieter than a two bladed prop, each running with the same net thrust. The two bladed prop needs higher RPM, this pushes the tips past the sound barrier. A 5-bladed prop runs at lower RPM, less sonic booms.
OK, the point is this: If your propeller is capable of making noise that greatly exceeds engine noise, why silence the engine? Yes, a prop-plane at straight and level flight is not as quiet as a car, but the thing is literally miles away from the nearest unprotected ear, so less need for sound suppression of the engine. Here in Seattle, where it seems everyone has a sea-plane, regulations over blade-count are coming into effect. 2 blades? Nope, too much noise at take-off. 3? OK, better. Still loud at high RPM's. 5 or 7? Yay! Never need to spin it fast enough for supersonic operation. Some newer props have many oddly curved blades, and run very quietly. Quiet propeller = efficient propeller.
Plane engines are designed to run close to WOT (wide open throttle) in a narrow range RPM for most of the flight.
Matching the pipe length to the RPM is called exhaust tuning, which improves the performance and to my understanding reduces the noise.
This means tuning the exhaust of each cylinder should be simple, basically cut to the right length and left open would be best.
(Source) Example exhaust tuning.