Mary stays home on behalf of watching her mother Mrs.Bennet, who could not sit alone. Mary is and always has been a bit of a recluse, with little social skills - she tends to studying and reading. She was obliged (encouraged) to mix more (interact) with the world, although to her parents surprise she was still able to moralize (pretentious/hypocritical banter - Victorian Georgian moralism) with the guests even in company of her sisters of whom are significantly more attractive - a quality which used to greatly upset her.
As we learn in the first chapter Mary is a girl of "deep reflection" and who has read many books and makes extracts, she is smart and clever not beautiful.
On page 8 Mary overhears herself mentioned as the most distinguished girl in the community unlike her sisters whom although always have partners (courtship) that is all they have been taught and rely on because of their beauty. A direct quote from page 16 reveals further information on her personality:
Mary, who having, in consequence of being the only plain one in the family, worked hard for knowledge and accomplishments,
was always impatient for display. Mary had neither genius nor taste; and though vanity had given her application, it had given her likewise a pedantic air and conceited
manner, which would have injured a higher degree of excellence than she had reached
Lastly on page 42 Austen addresses the transparency of Victorian Georgian moralism and affirms Marys affection to it.
They found Mary, as usual, deep in the study of thorough-bass and
human nature; and had some extracts to admire, and some new observations of threadbare morality to listen to.
Austen is a critic of Victorian Georgian morality specifically in etiquette, manners, religious conduct and prudishness. Mary is a personification of stereotypical moralists at the time.