I believe the answer is given in a Jaime chapter in A Storm of Swords, when the following conversation between Cersei and Jaime takes place.
"Oh, don't be absurd." Cersei closed the window. "Yes, I hoped the boy would die. So did you. Even Robert thought that would have been for the best. 'We kill our horses when they break a leg, and our dogs when they go blind, but we are too weak to give the same mercy to crippled children,' he told me. He was blind himself at the time, from drink."
Robert? Jaime had guarded the king long enough to know that Robert Baratheon said things in his cups that he would have denied angrily the next day. "Were you alone when Robert said this?"
"You don't think he said it to Ned Stark, I hope? Of course we were alone. Us and the children." Cersei removed her hairnet and draped it over a bedpost, then shook out her golden curls. "Perhaps Myrcella sent this man with the dagger, do you think so?"
It was meant as mockery, but she'd cut right to the heart of it, Jaime saw at once. "Not Myrcella. Joffrey."
A Storm of Swords, Jaime IX
The observant ones will have noticed this already in ASOS, when Tyrion and Joffrey have their interlude about "Valyrian steel" just before Joffrey is assassinated. The place where Joffrey gets his reforged Ice Valyrian steel sword - and hacks Tyrions wedding present books apart he says the following:
"Have a care, Your Grace," Ser Addam Marbrand warned the king. "Valyrian steel is perilously sharp."
"I remember." Joffrey brought Widow's Wail down in a savage two-handed slice, onto the book that Tyrion had given him. The heavy leather cover parted at a stroke. "Sharp! I told you, I am no stranger to Valyrian steel." It took him half a dozen further cuts to hack the thick tome apart, and the boy was breathless by the time he was done. Sansa could feel her husband struggling with his fury as Ser Osmund Kettleblack shouted, "I pray you never turn that wicked edge on me, sire."
A Storm of Swords, Sansa IV
Basically, what probably happened is: Robert - while drunk - says it would be a mercy to kill Bran, rather than let him grow up to be a cripple. Joffrey in an attempt to ingratiate himself with his estranged father grabs the nearest dagger he can find (from his father's armoury) and hires the nearest catspaw he can find to do the deed. He doesn't plan this, he just does it. We are not privy to any more detailed reasoning (nor will we ever be).
It does seem like Joffrey knew the dagger was Valyrian steel, as he mentions it in the Tyrion scene mentioned above. So it would seem that Joffrey is just that stupid, and didn't consider that the dagger would be traced back to him.