Short answer
Because Ned was not willing to provide legitimacy to Joffrey's rule by swearing oath of fealty to him when he knew that real heir was Stannis Baratheon. He had already confronted Cersei about it and rejected her offers so he knew Cersei would never forget it. In any case, he was not going to forgive the people who murdered his men, Jon Arryn and attempted murder of his son. You can read the detailed answer below.
Ned's confrontation With Cersei
As you noted, Ned had already confronted Cersei where he told her that he knew about her secret and he was going to tell Robert. Of course at that time, Ned had no idea that Bobby Baratheon (Robert) will get killed before Ned ever gets a chance to tell him.
From AGOT:
“I know the truth Jon Arryn died for,” he told her.
“Do you?” The queen watched his face, wary as a cat. “Is that why you
called me here, Lord Stark? To pose me riddles? Or is it your intent
to seize me, as your wife seized my brother?”
“If you truly believed that, you would never have come.” Ned touched
her cheek gently. “Has he done this before?”
Then Cersei openly admits her incestuous relationship with Jaime and murder attempt on Bran :
“My son Bran...”
To her credit, Cersei did not look away. “He saw us. You love your
children, do you not?” Robert had asked him the very same question,
the morning of the melee.
He gave her the same answer. “With all my heart.”
“No less do I love mine.”
Ned thought, if it came to that, the life of some child I did not
know, against Robb and Sansa and Arya and Bran and Rickon, what would
I do? Even more so, what would Catelyn do, if it were Jon’s life,
against the children of her body? He did not know. He prayed he never
would.
“All three are Jaime’s,” he said. It was not a question.
“Thank the gods.”
Ned's refusal to Cersei's offer
Cersei already offered Ned her affections and role as Hand during Joff's regency but Ned refused that, being a honorable man:
“You know what I must do.”
“Must?” She put her hand on his good leg, just above the knee. “A true
man does what he will, not what he must.” Her fingers brushed lightly
against his thigh, the gentlest of promises. “The realm needs a strong
Hand. Joff will not come of age for years. No one wants war again,
least of all me.”
Her hand touched his face, his hair. “If friends can turn to enemies,
enemies can become friends. Your wife is a thousand leagues away, and
my brother has fled. Be kind to me, Ned. I swear to you, you shall
never regret it.”
“Did you make the same offer to Jon Arryn?”
She slapped him.
So he made it clear to Cersei that he won't support Joff's ascension to the throne, no matter what. Had he acted like he had changed his views, Cersei would never have bought it so there was no point.
Ned's views about alternate candidates
Ned had no intention of supporting anyone except Stannis, be it Joffrey or Renly or Daenerys. The reasons for each claimant were:
- Joffrey was a bastard born out of Jaime and Cersei's incestuous union.
- Renly was Robert's younger brother and Stannis' claim came before his.
- Daenerys was a Targaryen and Eddard had no intention to bring the dragons back. He was fully committed to cause of House Baratheon.
- Jon Snow is most likely a bastard, no matter what his parentage is because Rhaegar was already married before "abducting" Lyanna and there is no indication that the two married before conceiving Jon. No bastard can ever hold a landed title. In any case, as mentioned before, Eddard had no wish to restore Dragon Kings given that he never even considered Daenerys or Viserys.
He made it clear to little finger:
“No,” Ned admitted. “I know the secret Jon Arryn was murdered to
protect. Robert will leave no trueborn son behind him. Joffrey and
Tommen are Jaime Lannister’s bastards, born of his incestuous union
with the queen.”
Littlefinger lifted an eyebrow. “Shocking,” he said in a tone that
suggested he was not shocked at all. “The girl as well? No doubt. So
when the king dies...” “The throne by rights passes to Lord Stannis,
the elder of Robert’s two brothers.”
Lord Petyr stroked his pointed beard as he considered the matter. “So
it would seem. Unless...”
“Unless, my lord? There is no seeming to this. Stannis is the heir.
Nothing can change that.”
“Stannis cannot take the throne without your help. If you’re wise,
you’ll make certain Joffrey succeeds.”
Ned gave him a stony stare. “Have you no shred of honor?”
Ned's refusal to forgive "crimes" of Lannisters
Ned refused Littlefinger's suggestion to support Joffrey, citing that Lannisters had tried to kill his son and murdered his sworn men and Jon Arryn. Being a sentimental man, he was not going to forget that.
“Your price.” Ned’s voice was ice. “Lord Baelish, what you suggest is
treason.”
“Only if we lose.”
“You forget,” Ned told him. “You forget Jon Arryn. You forget Jory
Cassel. And you forget this.” He drew the dagger and laid it on the
table between them; a length of dragonbone and Valyrian steel, as
sharp as the difference between right and wrong, between true and
false, between life and death. “They sent a man to cut my son’s
throat, Lord Baelish.”
Ned's unwillingness to swear fealty to Joffrey
Ned knew that if Joffrey was allowed to take the throne, his first act would be demand of renewed oaths of fealty from his Lords. Ned was never going to give it to him because that would legitimize Joffrey's claim and make Ned honor bound to obey his commands. This was in fact the first act of Joff:
“I command the council to make all the necessary arrangements for my
coronation,” the boy proclaimed. “I wish to be crowned within the
fortnight. Today I shall accept oaths of fealty from my loyal
councillors.”
If Ned had given his oath of fealty, he would have no moral ground to renounce it later. Ned was nothing if not a moral man. Even Cersei knew that if Eddard swore oath of fealty once, he would not be that much of a threat as she could then say that Eddard Stark was lying and breaking his oath to the King afterwards if Eddard tried to rouse people for Stannis. She was willing to offer Eddard a safe retreat to Winterfell if he did so:
We have a new king now,” Cersei Lannister replied. “Lord Eddard, when
last we spoke, you gave me some counsel. Allow me to return the
courtesy. Bend the knee, my lord. Bend the knee and swear fealty to my
son, and we shall allow you to step down as Hand and live out your
days in the grey waste you call home.”
Littlefinger's game
Littlefinger knew his best interests would be served by ascension of Joffrey. Which is why he made the following proposal:
Ned gave him a stony stare. “Have you no shred of honor?”
“Oh, a shred, surely,” Littlefinger replied negligently. “Hear me out.
Stannis is no friend of yours, nor of mine. Even his brothers can
scarcely stomach him. The man is iron, hard and unyielding. He’ll give
us a new Hand and a new council, for a certainty. No doubt he’ll thank
you for handing him the crown, but he won’t love you for it. And his
ascent will mean war. Stannis cannot rest easy on the throne until
Cersei and her bastards are dead. Do you think Lord Tywin will sit
idly while his daughter’s head is measured for a spike? Casterly Rock
will rise, and not alone. Robert found it in him to pardon men who
served King Aerys, so long as they did him fealty. Stannis is less
forgiving. He will not have forgotten the siege of Storm’s End, and
the Lords Tyrell and Redwyne dare not. Every man who fought beneath
the dragon banner or rose with Balon Greyjoy will have good cause to
fear. Seat Stannis on the Iron Throne and I promise you, the realm
will bleed.
“Now look at the other side of the coin. Joffrey is but twelve, and
Robert gave you the regency, my lord. You are the Hand of the King and
Protector of the Realm. The power is yours, Lord Stark. All you need
do is reach out and take it. Make your peace with the Lannisters.
Release the Imp. Wed Joffrey to your Sansa. Wed your younger girl to
Prince Tommen, and your heir to Myrcella. It will be four years before
Joffrey comes of age. By then he will look to you as a second father,
and if not, well... four years is a good long while, my lord. Long
enough to dispose of Lord Stannis. Then, should Joffrey prove
troublesome, we can reveal his little secret and put Lord Renly on the
throne.”
“We?” Ned repeated.
Littlefinger gave a shrug. “You’ll need someone to share your burdens.
I assure you, my price would be modest.”
Littlefinger lied about the war however because he was working from day one to start a war between great houses of Westeros to create a power vacuum which could then be filled easily by House Baelish.
We know it was Petyr Baelish and Lysa who had murdered Jon Arryn. It
was Petyr who sowed seeds of doubts between houses Lannister, Stark
and Tully by asking Lysa to write a letter, blaming the Lannisters for
her husband's murder. Had he not done that, Eddard would never have
started investigation of Jon Arryn's murder and Robert's bastards,
thus he would never have found out about Cersei's secret. For all we
know, Eddard would not have even accepted the post of hand as he did
so only when Catelyn convinced him that Robert would be in danger from
Lannisters and Jon Arryn's death would go unpunished.
But other than that he knew that his best interests lied with Joffrey because:
- Stannis Baratheon openly disliked Baelish and would have fired him as soon as he got his throne.
- Joffrey was a minor so his regency would open a lot of options for his regency council.
- Joff could be won over by Eddard Stark if he wanted to, opening more options for Baelish as close associate of Eddard.
- Renly was more useful as compared to Stannis so if Joff turned out to be "difficult", they could use Lord Renly to supplant him and reap more benefits as "Renly's loyalists"
Conclusion
Ned was in a haste to supplant Joffrey's reign as soon as he could because:
- Ned had already confronted Cersei that he knew the truth of Joff's parentage. Cersei was never going to forget that and anyone who knew that truth would be perceived as a threat by Cersei, making her do whatever she could to remove them.
- Ned had already refused Cersei's offers in return for Joff's favor. Had he later pretended to give his fealty to Joffrey, Cersei would not have bought it. She may let Eddard Stark slip away for the moment, but sooner or later she would come for him.
- Ned was an honorable man and he could not forget that Lannisters were behind murder of Jon Arryn, Men of Winterfell, Sherrer, Mummerford and assassination attempt on Bran. He wanted to bring them to justice.
- Had Ned sworn oath of fealty to Joff, that would have legitimized his rule. That would have also made Ned honor bound to obey the Lannister bastard. Ned was not going to let it happen.