When you configure an MCU pin as an output, you're telling the MCU to either connect it to the power rail (+3.3V in this case) or ground (0V), making a "high" or "low" voltage output.
If an MCU pin is configured to output high, and you try to connect it to ground, you're shorting +3.3V to ground. If an MCU pin is configured to output low, and you try to connect it to +3.3V, or 5V, or some other voltage source, you're shorting that voltage source to ground through the MCU.
Another situation you might run into is if the MCU pin is configured to output high, and you try to connect it to some non-zero voltage that is not equal to the MCU's IO voltage. In such a scenario, you're shorting the supplies together. Since the voltages don't match, a potential difference forms through the MCU with very low resistance, causing a large current to flow through the MCU and potentially damage it.
The circuit you showed for point 2 works by using the MCU pin as a sink rather than a source. Think of the pin as a switch that connects between +3.3V and 0V, like this:
simulate this circuit – Schematic created using CircuitLab
A current flows between two points in a circuit when there is a potential difference (i.e. a difference in voltage) between those points. When the switch is high, the cathode (bottom side) of the LED is at the same voltage as the top pin of the resistor, so the voltage across the LED is zero and no current flows through it. When the switch is low, the voltage at the cathode becomes 0V, so the potential difference through the resistor and LED becomes 3.3V, and a current flows, lighting up the LED.
In reality, the MCU uses a pair of transistors as a gate driver, rather than an actual switch.