When people marry because one or both get a benefit from doing this, this is called marriage of convenience. This is differernt from other types of marriage. Usually people marry because they love each other, or that they want some security if they have children. The benefits people could have from a marriage of convenience is that one of the partners is able to move to another country, to get a work permit or citizenship more easily, for example. Another reason why people use a marriage of convenience is to hide the fact that one or both partners are homosexual, or bisexual.
Marriages of convenience are not illegal, in most countries. In many countries, parents look for a suitable partner for their children. This is called arranged marriage. Many countries have laws against forced marriages, or fraudulent ones.