It is somewhat difficult to tell why Oscar Wilde wrote "The Importance of Being Earnest" without access to his inner thoughts. Since he was a professional writer, one can say that he wrote most of his plays and non-fiction primarily as a way to earn money. Within the play, however, he makes characteristic points and argues for positions coherent with those expressed in his non-fiction prose.
As many satires, "The Importance of Being Earnest" addresses what Wilde sees as the hypocrisies of Victorian culture, especially those having to do with sexuality, class, religion, and education; what is at stake is outward conformity vs. inner values. Perhaps also at stake in the Bunburying and double identities is Oscar Wilde’s own double identity as family man and homosexual.