Its foundation is that all agree what we should all have as rights were we to ever find ourselves the minority, and those become the principles we cannot break and we owe to each individual to uphold. Beyond that, majority can decide, hopefully not stupidly and still considering minority's input, as any good leader should do, consider all data points relevant to best decision making.
Inn what way is this a functioning parliamentary system then?
You can ask other parliamentary systems the same questions. For example, the Australian Labor Party requires its members to pledge their support for the collective ui decisions of the caucus, which prohibits them from "crossing the floor" as well.
Just as importantly, the Anti-“Crossing the Floor” law was passed in 1985 by the Congress Party under the leadership of Rajiv Gandhi (Son of Indira Gandhi, Husband of Sonia Gandhi, and Father of Rahul Gandhi). India’s been functioning under that system for almost 40 years, and I doubt Rahul Gandhi and Congress Party will repeal that law when they come back into party. That’s because it’s their law. They wrote it.
For what it's worth, while this does hinder a legislator from voting as per the will of their constituents even where they are at odds with the party line, within the Indian political system there are so many special interest parties that differ from each other in minor details of policy. In theory, the will of constituents could have been made manifest by voting for the policy adjacent party instead.
Again, it's not a perfect system, but it's attempting to fix the obvious issues that arose in India.
That is not true at all. Anti-defection law is applied when elected officials run on a party and once elected decide to change their party affiliation. Not for individual bills.
Quoting from PRSIndia [1]:
Does the anti-defection law affect the ability of legislators to make decisions?
The anti-defection law seeks to provide a stable government by ensuring the legislators do not switch sides. However, this law also restricts a legislator from voting in line with his conscience, judgement and interests of his electorate. Such a situation impedes the oversight function of the legislature over the government, by ensuring that members vote based on the decisions taken by the party leadership, and not what their constituents would like them to vote for.
Political parties issue a direction to MPs on how to vote on most issues, irrespective of the nature of the issue. Several experts have suggested that the law should be valid only for those votes that determine the stability of the government (passage of the annual budget or no-confidence motions).
[1]: [The Anti-Defection Law Explained](https://prsindia.org/theprsblog/the-anti-defection-law-expla...)
Also for a good chunk of its history, India has been run on super majorities as pointed out in this comment: https://news.ycombinator.com/item?id=32346371