Why do electronic circuits need their power supply to be DC, or rectified AC?
Your impression is correct.

AC flips polarity very often. Most semiconductor devices have been designed with very particular polarity conditions in mind. If one were to reverse the polarity between two inputs on many different components, you would get magic smoke coming out of it.

For example take mosfet operation. An NMOS is expected to block current from drain to source until the gate is activated. If you have AC across drain to source, then it allows current to flow backwards (losing gate control).

It's not impossible to design an electronic circuit with active devices around AC, but it makes it much more challenging. I should also qualify this statement: many electronics circuits do have signals with AC components to them, but they usually have a DC offset to them to prevent the polarity switching. That would be something like 5VppAC with a 2.5V DC offset would be an AC signal from 0-5 V. That remains the same polarity at all times even though it's passing an AC signal.