• Full-screened windows are virtual desktops with special UI treatment.
• Virtual desktops each have their own compositor texture "namespace", so that everything on the virtual desktop can be reformatted to deal with the screen beginning/ending mirroring/sharing, with the desktop being moved to a display that has a different color-space, etc. The copy of textures to new ones owned by the new virtual desktop, allows the compositor to be able to assume that a given desktop exclusively owns all the textures assigned to render on it. (It's the same set of engineering trade-offs as with message-passing IPC. Here the "messages" are textures and the "processes" are virtual desktops.)
• The "optimization" you mentioned exists and I already mentioned it. It was the old behavior. Go into Settings > Desktop & Dock and uncheck "Displays have separate Spaces." Congratulations, now you're using a non-per-virtual-desktop-texture-domained compositor. Enjoy going back to a world where putting your computer to sleep with no display attached, plugging the display in, and then waking it up, makes the kernel panic! But, if you do as a sibling commentor said and turn the animation down to nothing, you will surely notice the performance increase of full-screening windows.
> simply allocating one new screen sized texture to hold the application contents, which can be done in much less than one frame
Yes, this is what the animation that plays does at the beginning of the animation, on the existing virtual desktop — it creates a new, screen-sized texture, and renders the window being "resized to fullscreen" onto it.
Meanwhile, in the background, textures are being message-passed to a new virtual desktop.
> And if you think it's not worth the effort to optimize a case that typically happens every couple of minutes while people use macOS then I have to disagree in the strongest possible terms.
I don't know why you're full-screening windows so often.
> maximizing
Oh, maybe this is your misapprehension? Full-screen ≠ maximize.
Maximizing a window in macOS is what you get by option-clicking the green caption button. macOS calls this "Zoom".
Until Yosemite, this is the one and only thing the "maximize button" on a window did; "full-screened" windows didn't exist as a separate concept. There were just Spaces, with (maybe Zoomed) windows on them.
I — and pretty much every other macOS user I know — regularly uses zoomed (or just resized to be mostly zoomed) windows, but very rarely uses full-screened windows.
For a lot of reasons, full-screen windows on macOS are really inconvenient. They hide the menu bar; they cause some apps to make a ton of their UI elements inaccessible; they make "overlay" apps (e.g. iTerm's "quick access" theme) inaccessible; they make the Dock require a double-bump to access; they make things you open from the Dock open randomly on some other virtual desktop; they make it impossible to drag-and-drop things onto the full-screened window from another window; they make it impossible to grab the window itself with the mouse to move it to another display (instead requiring you to move the virtual desktop the window occupies to the other display); they don't respect application window grouping in Mission Control, so you inevitably "lose track of" the one window you decided to fullscreen; etc. (Also, until more recent macOS versions, full-screened windows couldn't even display modal dialogs or palette windows.) Basically, they take everything that makes macOS more useful than iPadOS and toss it in the trash.
Using windows zoomed rather than full-screened, meanwhile, has none of these problems. (If you want a zoomed window on a separate display, then make a new virtual desktop, move the window there, and then zoom it. I think Magnet has a hotkey for this.)