It is a natural fit with component-based frontend frameworks like React. You keep the styles with the component instead of having to work in two places. And it’s slightly nicer than writing inline styles.
The core CSS abstraction (separating “content” from “presentation”) was always flimsy but tailwind was the final nail in that coffin.
Then of course LLMs all started using it by default.