I was wondering if there were other uses for metaphors other than forming an allegory and for stylistic effect, that is, adding more flair to a description that would be otherwise dull. I've done some research and honestly I wasn't able to find anything that would suggest me otherwise.
Your two categories cover a whole lot of ground between the two of them. But there's at least one other usage that comes readily to mind that isn't really encompassed by either of those.
You can use metaphors to suggest the frame of mind or unique perspective of your POV character. Consider these two different descriptions of the same strand of trees in a swamp.
The trees stood, like so many pale, bare and slender legs, wading in a pool.
The trees stood, mired in the mud; silent, white-robed pallbearers at a funeral.
It's not exactly allegory, but you get a entirely different sense of mood and outlook with the two different metaphors. (The first is intended to suggest a horny teenager, the second one is someone depressed and grief-ridden.)
A metaphor allows you to explain something complex, abstract or unfamliar to the reader in a way that they have a good chance of understanding or relating to. You can also use them to evoke sensory memories to better convey a more realised experience, humans rely extensively on episodic memory and metaphors play into this:
Sam followed the sound of coughing and broke down the door with his axe, the bedroom beyond was a furnace, he couldn't believe anyone could be alive in there.
Sam followed the sound of coughing and broke down the door with his axe, the bedroom beyond was extremely hot, he couldn't believe anyone could be alive in there.
technically both are accurate and saying the same thing - but the metaphor version gives the reader something sensory to relate to, we know it's not a literal furnace but we're conveying how the room feels to them. Readers are more likely to have experienced the heat coming from a furnace then they are to have experienced walking into a bedroom in a burning house. And they will remember what that felt like, and at the very least they will likely know that furnaces are really, really hot things. Just saying it's "extremely hot" means you're pushing the mental load on to the reader to work out what something was like when it was what they would describe as "extremely hot" and try and fit in those sensations into the reading process which unconsciously will detract from the flow for them.
They also allow you to convey multiple aspects of something using very few words - in the above example the word "furnace" encapsulates that the heat was dry, there were flames everywhere and that it was life-threatening all in one go and allows for snappier pacing as required. Compare with:
Sam followed the sound of coughing and broke down the door with his axe, the bedroom beyond was full of an extreme, dry heat, far hotter than was safe, flames were everywhere and he couldn't believe anyone could be alive in there.
It's conveying all those attributes but takes 10 more words to do it, and in situation where you're wanting to convey a lot of simultaneous sensations taking lots of words to do it creates an artificial sense of delay. Not to mention if you're trying to portray a very short interval of time or a fast-moving situation you're dispelling the sense of urgency.
A metaphor can also be used to explain something in familiar terms. For example, when a popular science book describes Eisenstein gravity due to bent space by using the metaphor of a rubber sheet indented by various objects, with the dent representing the "gravity well" around a body. This particular metaphor has become so common it is a cliche, partly because it seems to work very well. Similarly, it used to be common to describe the structure of an atom as a miniature solar system, with the nuclear as the star, and the electrons as planets. Changes in our understanding of atoms has made that metaphor obsolete, but it is still used in describing the now outdated Bohr theory of atomic structure.
Also, a metaphor can be used to convey symbolism, but not all symbolism is allegory.
I say it in partial jest, but if the question is to be taken literally, then I see an answer outside of style and allegory.
A metaphor can be used to extend the word count of a piece of writing. Consider that each grain of sand is minuscule on its own, yet a beach full of sand is a massive stretch of time, of habitat, of vacation and relaxation. Similarly, each snowflake may be a harmless kiss from the icy heavens above, but a sky full of angry snowflakes can kill.
Metaphors are grains of sand and snowflakes. And, they can turn your term paragraph into a term paper. (I've certainly seen students try.)