Short version: because countries, like people, see value in belonging to clubs whose members share similar values and goals.
Long version:
The Commonwealth of Nations is a club of countries which are:
united by English language, history, culture and their shared values of democracy, human rights and the rule of law.
Also:
No one government in the Commonwealth exercises power over the others, as is the case in a political union. Rather, the Commonwealth is an international organisation in which countries with diverse social, political, and economic backgrounds are regarded as equal in status, and cooperate within a framework of common values and goals
Note in particular that:
As membership is purely voluntary, member governments can choose at any time to leave the Commonwealth.
In other words, it is a club where countries which have certain things in common can get together and discuss matters of concern.
When a country breaches the principles of the club, it is free to leave or face suspension. Though this can result in political pressure for change, the Commonwealth has no direct means of enforcing its rules.
To address points raised in the question:
53 countries, all [of which are] former British colonies except for two, are in the Commonwealth.
(Rwanda and Mozambique are the only ones which were never British colonies or similar.)
Why are countries such as India, which had a major protest movement to gain independence from Imperialist Britain, still in the Commonwealth?
India has been an independent republic since 1950. As for why India in particular is still a member of the Commonwealth, I was unable to find a definitive answer. Most articles or discussions simply cover the advantages for any member; for example, this Slate article goes over the purpose of the Commonwealth, but sums it up with, "It’s got great perks". See also this Quora question.
The closest to an answer that I was able to find was this question from elsewhere on this site.
In addition to those mentioned above, the aforementioned perks include:
- The Commonwealth provides assistants and consultants to member governments that want them, to help with better governance and economic growth.
- Commonwealth citizens can vote in the UK and in some other Commonwealth countries.
- Commonwealth citizens can get assistance from the UK's embassy if there isn't an embassy available for their own country.
- Participating in (and occasionally hosting) the Commonwealth games.