In Neil Shubin's, Your Inner Fish, the author builds upon his theory of evolution by studying the cranial nerves, specifically the trigeminal and facial nerves. He states that these nerves and their complicated, mesmerizing blueprint can actually be compared to the simple anatomy of fish through a comparative analysis of gill arches.
Both the trigeminal and facial nerves leave the brain and break off into an astonishing network of branches. The trigeminal nerve branches control muscles and carry sensory information from the face to the brain. For instance, the pain you feel when you get a bump on the face is due to your trigeminal nerve relaying information to your brain. Some trigeminal nerve branches go to the roots of your teeth. Dulling these nerves with anesthetic is important if you are undergoing dental work.
The facial nerve also controls muscles and relays sensory information. It controls your facial expressions, including frowning or lowering your jaw, raising your eyebrows, and flaring your nostrils.
The manner in which these nerves loop and turn appears to be a tangled jumbled but it is a simple wiring plan evolved from the development of the gill regions (or our inner fish). The trigeminal nerve is formed from the first arch; the facial nerve is formed from the second arch. The reason the trigeminal nerve connects to both jaws and ears is that it originated in the first gill arch. Likewise the facial nerve connects ear muscles and facial muscles because they are all second arch derivatives.