Mainsail out...boat heads up.
Actually, it works the other way. Main in, boat heads up.
That's right.
The sail plan has a Center of Effort (CE) that moves fore and aft, depending on sail trim. More pressure on the jib, it moves forward. More pressure on the main, it moves aft.
Likewise, the hulls have a Center of Lateral Resistance (CLR). Bow down, it moves forward; bows up, it moves aft.
If the CE is forward of the CLR, the boat will head off (lee helm).
If the CE is aft of the CLR, the boat will head up (weather helm)
The distance between the CE and CLR determines the strength of the helm. More distance - more helm.