I can't add much more, so I'll echo JLM's post.
As mentioned, there is what happens outside the box, and what happens inside the box. A speaker enclosure is not a musical instrument. The ultimate goal is for it to be acoustically dead.
Density/Mass, and stiffness of the enclosure are two very important and simple to implement criteria for controlling what happens outside the box (enclosure resonances). The stiffer you can make the enclosure, the higher the resonant frequency. The higher the resonant frequency of the enclosure, the more excitation it takes to get it to resonate sympathetically, therefore less amplification of resonances.
The use of dissimilar materials (AKA composites) aids performance by damping any remaining resonances even further by either raising resonant frequency, or converting soundwaves to heat.
Controlling backwave reflections inside the box are also very important, and sometimes difficult to implement due to enclosure size and cost constraints. There are alternative methods to control backwave energy from radiating back against the driver and creating non linearities.
Diffraction of soundwaves outside the enclosure is another important factor to minimize as well.
Even in a small 2 way speaker can you yield significant performance improvements in performance. A number of years ago, I built new enclosures for a pair of inexpensive Tannoy nearfield monitors for my studio. The original enclosures were built with a combination of 5/8" and 3/4" MDF and particle board, with a cardboard front port, and weighed 9 lbs apiece (sans drivers and crossovers). I overbuilt some new enclosures with 1 1/2" and 2 1/4" MDF while retaining the exact same internal dimensions. The weigh was 32 lbs per enclosure (sans drivers and crossovers). A large radius roundover was used to minimize diffraction, and the front firing port was replaced with a flared PVC port.
Then I A/B'd them side by side in my studio, feeding them the exact same mono sound source and by going back and forth by alternating which speaker got played via mutes on the mixing board.
I was not prepared for the differences heard. Clarity was much improved. The integration of the woofer and tweeter seemed smoother overall. The transition was much more transparent. Bass performance became much better defined and much clearer. Interestingly, the excursion on the woofer became larger with testing low frequency content. The latter might be due to the increase in width of the front baffle(by use of much thicker enclosure material) affecting the baffle step of the woofer.
If you were to A/B these 2 speakers blindly, you would think they were 2 different speakers. No joke.
Much like the body of a musical instrument has huge impact on the quality of sound, so does the the enclosure of a speaker. It has almost as much impact as driver selection of the speaker, if not more in some instances.

Cheers