On the origin of W-algebras