Tibet & Ladakh were always part of the Chinese empire. So were Arunachal and Vietnam, Monglolia, parts of what is now Russia.
Maharaja Ranjit Singh of Punjab pushed aggressively to the North into Tibet and Ladakh and wrested them from a weak China. Also with British help he pushed into Afghanistan and an independently wrested Khost from Persia.
His treaty with the British prevented him from coming into East into the weak Mughal Empire in Delhi and Awadh, which the British wanted for themselves. After the weakening of the Punjab empire, the British took over all territories of Punjab, including Tibet and Ladakh. Ranjit Singh's Dogra general was made king of Kashmir. The congress minister Karan Singh is a member of that general's family.
After the British left, India inherited all the territories that the British had won (Including Garhwal & Darjeeling, which it won from Nepal).
Now what China is doing is merely claiming its territories back which it lost from the British empire.