Yes when you think of it, you can only really generate power in two directions: from one leg to the other. Thus to maximize power you want the alignment of your feet relative to the target to match the trajectory of the punch. So for straight punches and uppercuts, you get the most power with your lead foot aimed at the target and your rear foot behind it (without being in a line or crossed for balance reasons of course). For hooks, they're harder if your foot position is square like the guy on the right in your example. It's no good to just stand that way though, every shot that hits you will knock you on your heels, your defense and distance are compromised and your straight punches aren't gonna be as effective. If you want to throw hooks from there, you have to be able to transition into that stance either off defensive movements, pivots or when your opponent is shelling up.

It's the same when you ask about kicks too. Guys who throw a lot of linear kicks will stand more like boxers whereas guys who throw a lot of round kicks stand more square. It's just how the body works.