In most countries, there are anti-monopolies laws so yes they are usually illegal. Monopolies have the power to fix the prices they sell at which is not in favor of the consumers and thus the society. Competition on the other hand tends to lower the price and increase the quality of the goods sold or the services delivered.