Quote 1
[Mary:] "Unhappy as the event must be for Lydia, we may draw from it this useful lesson: that loss of virtue in a female is irretrievable; that one false step involves her in endless ruin; that her reputation is no less brittle than it is beautiful; and that she cannot be too much guarded in her behaviour towards the undeserving of the other sex." (47.44)
Here, Mary is clearly echoing the sort of horrible, formal advice given to young ladies by the conduct books (books about how to behave and why) being published at the time. The awful humor here is that, of course, in the actual situation of the Bennets, with actual human beings, with real feelings involved, no one wants to hear this unsympathetic nonsense about the purity of women.
Quote 2
"Pride," observed Mary, who piqued herself upon the solidity of her reflections, "is a very common failing, I believe. By all that I have ever read, I am convinced that it is very common indeed; that human nature is particularly prone to it, and that there are very few of us who do not cherish a feeling of self-complacency on the score of some quality or other, real or imaginary. Vanity and pride are different things, though the words are often used synonymously. A person may be proud without being vain. Pride relates more to our opinion of ourselves, vanity to what we would have others think of us." (5.20)
Mary is our Greek chorus girl, parroting the advice manuals that were popular in the early nineteenth-century. (It's like going around and quoting self-help books.) Sure, she sounds like a real stick-in-the-mud. At the same time, isn't she kind of right? There is a difference between pride and vanity—and it's a lesson that Lizzy and Darcy both have to learn.