When William of Normandy became King William I of England after the Battle of Hastings in 1066, he was a conqueror with a very small army of foreign (French) soldiers. It was not at all certain that he could hold on to his newly-won kingdom.
William had to do something fast. He also had to pay off his barons who had lent him their troops. He did both things at the same time by giving out land to the barons, and insisting they built castles on it and defended their land in his name.