Hi Siddarth,
Yes, the original purpose of vlans was as you stated.
But with the increase in size of networks it is becoming more and more a requirement and with the advent of multilayer switching it became possible to have local vlans.
For the purpose of manageability and troubleshooting Cisco recommends, as per the Enterprise Composite Network Model, to avoid end-to-end vlans.
Instead, it is recommended to have local vlans. With multilayer switches and their layer3 features, like ACLs, it is possible to group users in different locations into one group, so no end-to-end vlans are needed.
In addition, the recent 20/80 rule of networking states that the local traffic is 20% of all traffic, 80% of traffic is towards other locations, like server farms, Internet, remote access etc.
Cheers:
Istvan