Let's not rewrite history. Somehow the counter point to these AI discussions seems to be some revisionist fantasy past where humans would only write perfect code at the height of the craft. That's just not true, there was plenty of shit code around before and business interests never cared one iota about "clean" code.
So no, we haven't gone from "making software as good and efficient as possible", that was always a niche.
I meant not just recently, not just because of AI but there was a time when we were required to write efficient code because of hardware limitations and inability to patch quickly. AI is still not a having a massive impact on software dev yet, but it benefits from last 2 decades of lowering standards.