One of the reasons that LLMs appear to be so resiliently good at frontend UX in modern patterns is because that code isn't challenging in a programming sense, it's a lot of boilerplate to get a mostly-the-same-kind-of-thing output.
LLMs do well with e.g. contained algorithms that are commonly shared in write-ups on the internet, but the kind of random non-web-frontend glue code and architecture of a real codebase they don't do as well at.
Still quite good, and often above the bar, just not always hitting it out of the park like they do for React style code.
The meta insight is that LLMs' ability to write code on demand is not some smooth distribution over types of code, but spiky based on which types of code are commonly found in tutorials and open source code, as well as how boiler-plate-y the code is.