In recent years, front-end development has exploded into a seemingly larger industry than back-end development, driven by new libraries and frameworks.
jQuery came along and the number of websites that contained some sort of interactivity without reloading started to balloon. Along with the nice new interactive sites came a dark side – developers that weren't really sure what they were doing, but being driven by hungry project managers they were forced into copying and pasting things they found that worked.
Spaghetti code gets a bad name because it has the potential to make something grow out of control and become very difficult to alter later. It's important to remember though that sometimes, a simple function is all you need. But we're on a quest for perfection!
You've probably heard of the term 'web app' in recent years. In my experience this is a buzzword which can be defined thus:
Amazon S3 went down for a while last week and took many sites along with it, Google hosted libraries has fallen over in the past too. Frameworks may be encouraging you to write somewhat less spaghetti code, but they're also making your websites worse when things go wrong. And if things are worse, why are you really using a framework?