Symbolism, Imagery, Allegory
What do these two people have in common? Yup: they're both totally made up.
And what do they symbolize in a play that lampoons shallow Victorian society? You've got it: the empty promises or deceit of the Victorian era.
Not only is the character Ernest anything but earnest for the majority of the play... but he also doesn’t even really exist. This makes Jack’s creation of him doubly deceitful. Bunbury sounds as ridiculous and fictional as he actually is. Both of them allow Jack and Algernon to live a lie—seeming to uphold the highest moral standards, while really misbehaving without suffering any consequences. Jack takes it a bit farther since he actually impersonates his so-called good-for-nothing brother:
Algernon: You have invented a very useful younger brother called Ernest, in order that you may be able to come up to town as often as you like. I have invented an invaluable permanent invalid called Bunbury, in order that I may be able to go down into the country whenever I choose. Bunbury is perfectly invaluable. If it wasn't for Bunbury's extraordinary bad health, for instance, I wouldn't be able to dine with you at Willis's to-night, for I have been really engaged to Aunt Augusta for more than a week. (I.88)
Even when Jack and Algernon are caught in their lies, they never suffer any real punishment. That they can both kill off their imaginary alter-egos and friends without much to-do shows Victorian society’s real values.
The Victorian Era didn't value honesty, responsibility, or compassion for the under-privileged (neither Lady Bracknell nor Algernon exhibits much pity for Bunbury when he "dies"), but only style, money, and class status. It is appropriate that the nonexistent characters of Ernest and Bunbury show how shallow the Victorians’ real concerns are.