Your engine ran at 165 degrees, which is your thermostat setting. That's just as it should.
If you openned the cap to the coolant, you
lost the vacuum that would draw the overflow back into the system. The excess coolant isn't necessary for
cooling the engine - most of us don't have overflow
tanks but keep the coolant level below what will vent, or we get coolant sprayed all over the engine.