Designer often prioritize design over user experience.
Custom mouse cursors, unaccessible images, non-obvious buttons, non-standard interactions, strobing lights, a million parallaxes.
A lot of designers think that "pretty" is the same as "usable".
Most devs I know, don't care about "clean code" itself, what they care about is _robustness_. If getting something to work requires thousands of lines of html, css, and javascript, then I can guarantee you that something is gonna look broken on some browser in some viewport size.
When designing you need to keep any mediums limitations in mind, be it paper or the web. The medium is the message.
Browsers are buggy implementations of mediocre standards, if you design oblivious to their limitations things will inevitably be buggy, ugly and weird.
Designers can't just live in an ivory tower of auto-layouts that actually work, and have devs magically weave their dreams from garbage.
If we just replaced the web with figma (or if Figma had a runtime like Rive, to just run the entire thing with the web as the platform), I'd be more than happy, not being editor-first is the biggest flaw of the web, and figmas auto-layout is a lot less sucky. But until then, (good) designers have to learn the basics of the tech stack too, and figma does not help in that department.