Marriage is the center of the Much Ado About Nothing. From the first scene in the first act, Claudio sets eyes on Hero and intends to marry her. The plot thickens as there’s scheming to marry Beatrice and Benedick, to un-marry Hero and Claudio, and then to actually marry Hero and Claudio. Marriage, though it’s the primary source of the drama, is treated like a necessary thing, otherwise the characters wouldn’t go through all the trouble it takes to get hitched. Still, though marriage is foregone conclusion, it’s also treated lightly as a constant source of jokes. Benedick only teases about marriage so much because it’s such an ever-present part of life. Another central component of marriage is the issue of deception; the butt of the marriage jokes is how tied down or cuckolded married folks become. Deception (especially of a cheating wife) is the source of cuckoldry, and even to the last lines of the play, characters tease that adultery is an ever-present possibility.
Beatrice pretends to despise marriage because she’s secretly afraid no one will love her. She is not actually against marriage, she just puts up hatred as a front against rejection.
Beatrice has seen too many women like Hero – women for whom marriage stifles their independent will – to be in favor of marriage. She could marry if she wanted to (as when Don Pedro proposes to her), but the entire institution is contrary to her ideals.