I think the botched hit scene in Diane's dream serves the purpose to show her fear that she's going to be caught. The killer has tracked down this former acquaintance who somehow knows that Rita/Camilla survived the car hit attempt. The "joke" that he is telling is how Rita was "saved" by a car accident. Because he knows Rita is alive, the killer needs to kill him for that reason. It doesn't matter how he knows (dreams never clean up details like that), he knows and must die. But it also shows how the killing is getting out of hand, beyond Diane's control. - (Bukama)
Ed botched the hit on Rita in the dream, so the Castigliane brothers and/or Mr. Roque sent Joe in to take his place as the hitman by killing him and taking the book of phone numbers which is integral in finding the people he will need to find. - (Darklite)
Ed himself probably does not do the dirty work, but has contacts and probably organized/hired the men to do the hit, which Ed's business ("Are you making ends meet?" "Hardly." "Look at my digs... times are tough, bro."). Joe said "I hope you're not gonna get in any trouble" because Joe knows Ed is in deep water because the job failed and the girl is missing; and now there is a police investigation, so Joe has to kill Ed and take his black book to get rid of any trace of evidence that may lead back to Diane's dark dream fantasy forces (Mr. Roque's Men & Co.) - (TristanLove)
Ed = Camilla's pimp?
Ed described his famous black book (Heidi Fleiss had one of those) as "The history of the world... in phone numbers". Since prostitution is the oldest profession in the world, it seems likely that Ed was a pimp. This conclusion seems even more plausible when Joe uses Ed's black book to track down Laney who certainly looks like a prostitute. - (fornus)
Ed's character assumes the role of Camilla's pimp mainly because he has a black book that Diane saw Joe with at the time Diane was arranging the hit on Camilla in her real life. To Diane, a black book represents phone numbers, and phone numbers represent the call girl profession. So since Joe is her ally against Camilla, she creates a scenario in her fantasy for how Joe came to have this book:
Joe is trying to track down Rita/Camilla, and he has come to a pimp to find out if she was one of his girls. Since Rita/Camilla is associated with Diane's sensual persona, which is what Diane embodies when she is involved in her call girl liaisons, the pimp was connected to Rita/Camilla. The two of them are talking about an accident which they say was something "unreal" which no one could have foreseen. It seems clear that they are referring to the "unreal" accident that Rita had at the beginning of the fantasy. Then Joe says to Ed, "Gee, I hope you're not going to get in any trouble." At which point Ed says, "Oh that was just a thing man." And a little later he mentions explicitly that it was a car accident.
So the question is, why would a car accident involving Rita make Joe think Ed might get in trouble?
Some reviewers have suggested that Joe was involved with the drag racers, perhaps even being in the other drag racing car that was not in the accident. But certainly that would be a bigger deal than the "that was just a thing" that Ed describes. If Ed had a relationship to any of the dead people at the scene, wouldn't he be dealing with some type of investigation? However, If Ed was a pimp sending the Rita persona to a John, like
Mr. Roque at the beginning of the fantasy, then the problem Ed would be facing would mainly amount to an unhappy client whose call girl never showed up. And in that case it makes sense for him to say, "that was just a thing," because he has many more numbers in his black book. Losing Rita does not hurt his business that much.
Related: The Call Girl scenario
Ed's strand of hair
After Ed gets shot there's a close-up on one particular (combusted?) strand of hair. The hair is indeed an arrow, pointing us to look at the Italy poster at the opposite side of the room. But I think it's more likely that Lynch is pointing us, literally, toward a connection between Ed and the Castiglianes. And that would lead us to Blonde Camilla, and Ed's Black Book. And the question of whether the book is connected to the Castiglianes. This takes us to whether Joe, who is looking for Rita, is somehow in opposition to Ed and the Castigliane bros, and whether he would help her, or otherwise... - (blu-riven)
Upon looking at Ed's 'pointing' hair now, I see that it is black, speckled with red, and it's pointing at the black book to signify that the black book is related to the call girl/prostitute profession. - (Vickie Balamoti)
Ed, the guy killed by the hitman in that office, is none other than the guy behind Winkies. Remember when Lynch focuses on the brain-splattered strands of hair sticking straight out from the exit wound? That was a hint. The man behind Winkies has natty hair, hardened and dirty and whatnot. You can examine a picture of the guy in the office, then look at the guy behind Winkies, somehow they're the same guy. - (wasto7)
Lynch likes the name "Ed" for his works: