Because the characters were separate and Vader killed Luke’s father who was unnamed at that point. Obi Wan had two students. Then it became Obi Wan was lying. He could have said Anakin Skywalker your father was a pupil of mine until he turned to evil, he decided to hunt down the Jedi knights and murdered your mother Luke.
Maybe he should have also said this lightsaber cuts down younglings like butter while Luke is fooling around with it in Ben’s hut.
He had to convince Luke to join him on his foolish, idealistic adventure to defeat the Empire. What better way to lie, what better way than to forge Luke into a weapon by making him hate Vader, and to tell him his father was a legend. A great starpilot and cunning warrior and a good friend.
Luke wouldn’t have accepted the truth at that point, he might have even been tempted to join the Empire.