The surprise being referred to in the question above has two parts; first, when everyone discovers that Jack is actually Lady Bracknell's nephew; and second, when the power and control seem to shift from Lady Bracknell to Jack as far as the two couple's marriages are concerned. At first it seemed that it would be enough for Lady Bracknell to approve of the marriage between Jack and her daughter when she found out his true lineage, but it wasn't. It wasn't until she needed Jack's approval for Algy to marry his "ward" Cecily that Lady Bracknell had to step back. It seemed quite cleaver and brave for Jack to stand up and negotiate terms with a strong-willed woman like that; so, the ending seemed to work quite well. Jack was able to maintain his manhood and stand up to her while the audience enjoys a couple of twists and turns in the end. It was a logical and fun ending.