That was for their own protection. U think if Robert somehow finds out, Ned gonna just hand Jon over? He gonna protect him in winterfells walls. He gonna have to Rebel against Robert to protect Jon and he would because family is first. If Robert came thru to crush winterfell, the whole family suffering. That's not a secret u can let out to anybody.
Robert wouldn't have let Jon live at all.
As far as honor goes, it is a matter of perspective. I think Ned would've felt he was doing the honorable thing by protecting his sister's child as he promised he would on her dying bed. If he has to sacrifice his wife's happiness and lie to his best friend/king to keep promise then so be it.
Y'all are missing my point. I know Ned couldn't tell Robert. I know he had to choose between loyalties
What I am saying is, it's not so cut and dry, "Ned was the most honorable guy".
This is game of thrones. Nobody is all perfect. In order for ned to keep one promise to his sister, he had to lie to his friend, lie to his wife, lie to his kids. And that left a stain on his marriage, pain in his wife and left Jon with a life full of hate directed his way.
Could he have told another lie? Maybe. Could he have told his wife at the least and trusted her? Maybe. But he did what he did.
But other than that. There were other times where he took an oath as hand, where he again betrayed rob. Maybe he felt his reasons were justified. He didn't want a war and he didn't want kids killed. But was his oath to the kids? Or was it to Robert? He was protecting Roberts enemies. Enemies that he thought killed Robert arryan as well. Another oath/friend he was sworn to.
Then he wrapped it all up by lying again. To save his family.
Can these things be justified. Sure. But they can just as easily be justified as treason, especially telling cersei to run