Disclaimer: IANAH. Not even an amateur one.
Several customs made Marriage expensive, as in some sense it still is.
They very at least across period, country/region, and social class.
As mentioned in the comments, Dowry, Dower and Bride-Price were all customs by
which one party to the marriage must provide some sort of financial compensation
in order for the marriage to take place. A Dowry involved payment to the husband
by the bride's parents, in certain traditions directly to the groom, and in others
to the bride as a means to establish her new home to similar standards in which
she was raised. A bride-price was payed by the groom to the bride's parents,
and A Dower was property turned over to the bride by the husband.
These customs were instruments that facilitated the arrangement of marriage
in various ways. They could ensure a wife's position in case the marriage
resulted in separation or divorce. They could guarantee a certain quality
of life for the wife, at least at the beginning of the marriage, and the transferred
wealth could then be passed on to descendents. A large dowry could be used
to lure a husband of higher social class or prospects, or to marry off a
daughter who did not attract suitors on her own merits. On the other hand,
a daughter who was highly attractive (in appearance or personal qualities)
might solicit a proposal of marriage even without any dowry to offer,
a major plot device in "Pride and Prejudice", for example. a Dowry
could also be used a device for negotiating alliances, when
a union between households had geopolitical significance, negotiations
over the dowry could in effect express the terms of the alliance. We
see traces of this in the opening Scene of "King Lear", for example.
A bride-price was paid by the husband to the parents of the bride, suggesting
that it was in the husband's interest to seek the marriage.
Besides these customs, the customs relating to the wedding itself are also
varied and could be expensive then, as indeed it can be today. However, an
expensive celebration was often an expression of wealth particular to social
class. As early as the late 18th century in Wales, so-called "Cardigan Weddings"
in which the guests were invited "to bring the feast with them", as it were,
were common, and therefore the cost of the wedding feast was in some locations
was not prohibitive.
Civil marriages were possible in France since the end of the 18th century, and in engaged by the middle of the 19th century. The reduced cost of marriage
by an official meant that it was much less of a hurdle if it had ever been.
In England, a long-standing custom called "the banns", required that an
upcoming marriage first be announced to the congregation in church, and time
given for members of the community to raise objections, if one of the parties
being married, or if they were related in some way. It seem plausible to me
that this custom was the origin of the familiar "speak now or forever hold your peace"
part of the Christian marriage ceremony, but I haven't investigated.
The delay involved during the waiting period associated with "the banns" was
an inconvenience to some. Understandable if one remembers that people often
married young, and that chastity before marriage meant that any delay of the
wedding also meant a delay of the young couple's sexual relationship. That goes
some way to explaining why young couples, and perhaps the groom in particular,
sometimes felt an "urgent" need to have the wedding as soon as possible. To facilitate
this, the possibility of marrying using a "wedding bond" instead of waiting for
the "banns" was instituted. The couple were allowed to marry without delay, but
the husband was required to post a bond on the guarantee that there exists
no lawful reason for marriage not to take place. The bond had a term of a year
or so, and if the marriage turned out to have been unlawful, the value of the
bond was forfeited.
As the more specific issue of the exchange in Ibsen's play, I think
the explanation is that for various reasons, possibly bride-price as mentioned later in the play, engaging in a "proper", respectable marriage according to upper middle-class norms was indeed expensive but, no less importantly, it was also "rigid". Oswalds' stay in Paris among his artist-friends clearly
suggests they are living a bohemian lifestyle and so although they may not be able to afford all the accoutrements
of a bourgeois marriage, they are also probably not particularly interested in settling into such a "respectable" family life. Instead, they engage in illicit affairs, which result in children and then simply go on to set up home with the
women they are involved with. It's not implied that these women were the
same "daughters from good homes" which they could afford neither to marry nor
,presumably, to provide for in the style to which they were accustomed and their parents demanded.
References:
Why did some people need to pay a bond in the 1700s in order to get married?
https://hauntedpalaceblog.wordpress.com/tag/marriage-act-1753/
https://en.wikipedia.org/wiki/Bride_price
https://en.wikipedia.org/wiki/Dowry
https://en.wikipedia.org/wiki/Civil_marriage
https://en.wikipedia.org/wiki/Banns_of_marriage
I've unforgivably lost the original source which provided a reference regarding "Cardigan Wedding"
but the reference itself can be found on google books, it appeared in installments in
"Gentelman's magazine" Vols. 61,62,63 (1791-2), and titled "Morrisian Miscellany, Cardigan Weddings"