When Luke had a son, he called him Ben, in honor of his old master. But his master's real name was Obi-Wan. Why did he use the false identity of his master to name his son? After all, he barely knew him before his real name was revealed.
The names you first know someone by are hard to shake. Luke first knew Obi-Wan Kenobi by the name Ben Kenobi so that's how he always thinks of him. This is similar to how the hobbits in Lord of the Rings continue to refer to Aragon by the name Strider even after they learn his true name.
From the Star Wars film script:
THREEPIO: He says he's the property of Obi-Wan Kenobi, a resident of these parts. And it's a private message for him. Quite frankly, sir I don't know what he's talking about. Our last master was Captain Antilles, but with what we've been through, this little R2 unit has become a bit eccentric.
LUKE: Obi-Wan Kenobi? I wonder if he means old Ben Kenobi?
THREEPIO: I beg your pardon, sir, but do you know what he's talking about?
LUKE: Well, I don't know anyone named Obi-Wan, but old Ben lives out beyond the dune sea. He's kind of a strange old hermit.
In The Empire Strike Back, Luke knows Obi-Wan's true name, but he reacts and responds to his ghost as Ben Kenobi:
Luke lies face down in the snow, nearly unconscious. Slowly he looks up and sees Ben Kenobi, barely visible through the blowing snow. It is hard to tell if Kenobi is real or a hallucination.
LUKE: (weakly) Ben?
BEN: You will go to the Dagobah system.
LUKE: Dagobah system?
BEN: There you will learn from Yoda, the Jedi Master who instructed me.
The image of Ben fades, revealing a lone Tauntaun rider approaching from the windswept horizon.
LUKE: (groaning faintly) Ben...Ben.