When I was taught the wisdom from the Bhagavad Gita and Upanishads (ancient Hindu Sacred Scriptures) at the ashram, I thought that man was given a free will of thought – that he is entitled to anything he wants to think and there is literally no one to stop him.
The teachings of the great wisdom from the ancient Hindu Sacred Scriptures preach that man should realise his real identity, or real Self from his Non-Self (or false identity). They state that it is only man's desire and wants that have caused him all his sorrow in his life. They preach that when man withdraws his wants and desires of the objects of the world, he shall become happy and blissful, that everything shall go on fine in his life, and that he is finally on the right path in life – the Divine Path. To renounce is divine.
So it appears that even God cannot control the mind of a man but the individual himself. Without a conscientious effort on the part of a human being to literally 'realise' that it is only his desire that is the root-cause of every one of his problems in life, and to rely on his own self-effort to make the changes himself, for his own benefit and happiness.
Therefore, this looks like man has "free will" of thought and is free to think in anyway he wants to... but No.
Upon deeper studies of the Hindu sastras (scriptures), the subject of "Karma" pops up. We have a very limited understanding of what Karma really is and how it works. As it turns out, man actually does not have any free will of thought because Karma is there – the mighty 'scorecard'. Yes, Karma keeps an account of every single time we hurt someone through our thoughts (no words), words, and actions. Simply 'thinking' ill of someone, accrues some Karma for us.
Karma is the reason why any one of us are here on earth. Earth is for the 'judged', the sinners to pay the price of their ill-doings in the past lives and the present life. We are trapped in this "cycle of birth and death", known as "Samsara". To be free from this cycle is the goal for every human being on earth. To be free from this cycle also means to be free from the cycle of suffering on earth, and after, eternally. This is known as "Liberation" or "Moksha".
So, while man may think that he has "free will" and freedom of thought and choice, his hands are yet tied in ropes – Karma watches and sentences the guilty and unrighteous.