Shared hosting is like you are living in a room with a lot of friends. It means you must fit in the same room and you must split the cost of several things because it is affordable and cheap. However, several individuals are sharing the same space, it means everyone needs to live within a space with restricted resources among them. You will have to use the same things (that sounds a little unhygienic).
The force driving server virtualization is similar to that which led to the development of time-sharing and multiprogramming in the past. Although the resources are still shared, as under the time-sharing model, virtualization provides a higher level of security, dependent on the type of virtualization used, as the individual virtual servers are mostly isolated from each other and may run their own full-fledged operating system which can be independently rebooted as a virtual instance.