I think it actually has a lot more to do with mobile. Back in the day you could just send everyone the same HTML/JS/CSS rendered on your server and it would work for everyone.
Now things are more complicated: people want "native apps" on their Android and iOS and whatnot, and also want a "desktop" version and a "web version".
So you build a "light" server API, and put a lot of logic in the frontend. Not to save money, but because all the frontend logic is different on every platform (and in different languages: JS on web, Java or Kotlin on Android, Obj-C or Swift on iOS).
Mobile complicated these things a lot more than people realize.