A paradox often considered as one of the funniest in any Oscar Wilde play, this expression is spoken by Lady Bracknell during her interview with Jack Worthing (whose name they all think is actually Ernest Worthing).
Upon hearing that her daughter Gwendolen was interested in marrying Ernest, Lady Bracknell conducts a thorough question and answer session where she inquires about Ernest's finances, his properties, and even about whether he smokes, or whether he knows "everything, or knows nothing".
The most important question, however, has to do with lineage. In high society it is not just enough to have money; it is also necessary to come from a well-known, historically important, and well-connected family that assures a place within the fashionable society.
Unfortunately for Ernest, he can claim no such privilege. He explains how he has lost both his parents or, actually, his parents have "lost" him. When he was a baby, Ernest's accidentally abandoned him by leaving him inside of a handbag in the cloak room of Victoria Station. He even makes the point that he was left in "the Brighton line" of Victoria Station as if that would give his abandonment a little bit more class being that Brighton is a getaway destination for the rich.
Since Lady Bracknell is oblivious to any human emotion, nor does she care about stories that have nothing to do with her, she completely ignores Ernest's story (which is actually quite tragic) and focuses on the inconvenience of not being able to "connect" Ernest with any high-ranking family.
In Wilde's typical comedic style, she says
to lose one parent may be regarded as a misfortune
meaning that it is bad enough to lose a parent, however the paradox comes when she adds
to lose both looks like carelessness
which is basically a non-sense way to compare losing two parents to losing any two objects at the same time. What Lady Brackell intends to say is that surely something could have been done to avoid the fastidious fact that now she has no big family name to which she could link Ernest.
In the literary sense, it is basically an ironic and even sarcastic way to disregard Ernest's loss. Yet, Wilde adds the superlative language of Lady Bracknell, and combines it with her lack of emotion, to bring out the trivial and superficial nature of the upper classes that she represents.