I think it matters for Google where is the site hosted. The best choice is to be hosted on dedicated server at ISP. I'm pretty sure that moving from shared hosting to dedicated will boost ranking. So it is another reason to relocate to dedicated server.
The main reason however is the fact that shared hosting is becoming less and less reliable after a certain threshold of traffic. No matter how good it is.