How do megaphones work?
I find the explanation given in the first paragraph of Wikipedia article is pretty good. Let me just elaborate some aspects to make it more clear.
Megaphone is simply an extension of your vocal tract. Therefore the acoustic impedance of the whole system rises so the pressure and volume flow variations at your vocal chords may grove. A trade-off is significant fatigue of vocal chords (well, conservation of energy...) and a bit unnatural sound of human voice. The extended vocal tract has modified radiation impedance and frequency response so the spectrum of the voice will be changed in a manner physiological waveguide wouldn't do.
A little off topic: there are therapeutic techniques based on this very phenomena. By extension of vocal tract by appropriate long narrow pipes you may let's say do some "vocal chords stretching and fitness".
You are right, according to Huygens principle sound is expanding (or tries to expand - don't forget the interferrence!) to all directions but there is no telling whether the intensity of the sound will be the same in all directions. The megaphone concetrates the intensity in its direction.
Don't forget the reflexion of the sound. In the room, usually just a smaller part of the sound is delivered to you by the direct field. The rest is sound reflected from the walls. Therefore you haven't to concentrate the sound energy, the room itself will partly do it for you by not letting the sound go towards infinity. But when you want to shout at a demonstration of unions somewhere outside, something should concertate the sound for you or it's just going to be wide-spread and therefore not loud. From the cone of the megaphone comes a narrow spherical wave with pronounced directivity and the diffraction is not so significant (see the GIFs here).
When one shouts , the sound waves disperse in a semicircle , the power of the voice cords distributed to 180 degrees. A simple megaphone channels the sound in a small angle and thus is directional and stronger. Electric megaphones amplify the sound and still send it in a narrow cone.
At the output of the cone the sound wave spreads, but it still is much more directional than if no megaphone is used.