If you want to grow, you cannot stick to just one company. By working in different companies, you obtain experience of different spheres and hence, become more skilled that helps in getting better salary.
This is not the thing of today. This has been happening for years, but the number of people leaving companies has increased. Many IT professionals do MBAs and join some management-related companies too.