I think it’s become fashionable due to how trackers and dark patterns have used JS. But as someone has pointed out, it’s people not the technology...
People started using invasive trackers not because the trackers are innate, but because someone built them.
People are starting to realise how a lot of JS use is unnecessary, and the opposition to it is growing.