I'm reading an abridged version of The Age of Innocence (i.e. reader) and I came across the following sentence: "(...) and [she] made what people thought was a most foolish marriage to Julius Beaufort." I don't know what it exactly means. Is "make marriage to somebody" an archaic for "get married"?
There are a couple of different senses of make that can apply to a marriage.
The sense here is "to enter into a contract, settlement or bargain", and it was indeed used especially of the contract of marriage.
And still is sometimes, but it has become pretty rare.
Now the form, "make a [adjective] marriage" is quite idiomatic. Or at least it was, I'd think of it as belonging to the 19th Century, though it's hard to check with ngrams due to other uses of the same phrase. The Age of Innocence of course is early 20th Century, but it is set in the 1870s, so the wording may well have been chosen because Wharton likewise thought of it as belonging to that time. Or I could be wrong, and it was just a natural phrasing to her.
It means, to enter into a marriage that is [adjective] from the perspective of the subject. Hence, "he made a good marriage" would mean that "he" did well in who he married, generally considered more in terms of the social, financial and practical aspects than any others.
Hence to say "she made what people thought was a most foolish marriage to Julius Beaufort", means that she entered into a marriage with Julius Beaufort, which most people thought was most foolish.