I often get asked, “Do we need witnesses to make our marriage legal?” While this is a tradition that many consider special it is not legally required. So the simple answer is “No.”
The legal requirement is that your officiant witness the marriage, who would be with you anyway.
I have heard that there was a time when it was a legal requirement. And when it was, it made it a little difficult for couples who wanted to privately elope. When a couple wanted to have a private beach ceremony without any guests, they would ask a stranger come to witness and sign the papers. This could be fun or it could be awkward. So thankfully, the legal requirement for marriage is now more practical.