In the early Nineteenth-century, anyone who attended college received a "classical education." Memorizing both Latin and Greek literature was the majority of one's "homework."
Nathaniel Hawthorne graduated from Bowdoin College in Brunswick, Maine attending from 1821 to 1825 (yes, it is still in operation today).
As many well-known literary figures, Hawthorne incorporated mythology into his writing. Learning the mythology as he did as a young man had to influence what and how he wrote after graduation. Much of Hawthorne's writing centers on New England, many works featuring moral allegories with a Puritan inspiration. His fiction works are considered part of the Romantic Movement and, more specifically, dark romanticism. His themes often center on the inherent evil and sin of humanity, and his works often have moral messages and deep psychological complexity. Mythological references offer the writer a method to insert layers of meaning into what one writes and that style complements passages with psychological complexity.