SSD’s usually don’t require it. HDD may need It. If I remember correctly defragmentation is done automatically since Windows 7 I think. I could not comment on inefficient programming. Automatic processes is to some degree unavoidable ( mainly system processes) but you can configure startup applications and services. I agree with you that computers are much faster than they used to but I suspect that applications also require more resources than they used to. Real antivirus software, VPN just to name these two are often ressources hogs.
A lot of people have the system drive and data drive on the same physical disk, not necessarily a good thing performance wise.
In the end it’s never fast enough especially when we are waiting for the task to complete.