Spider-Man 3 was completely fucked with by Sony Pictures.
Raimi had actually scripted a trilogy for the Symbiote storyline, with it going like it did in the comics, where Spidey had the symbiotic suit for years before finding out it was dangerous, getting rid of it and then the symbiote escaping and finding Eddie to become Venom.
Sony wanted every character and all the plot points compressed into one movie because key contracts were ending at the third movie and some character rights would revert to Marvel if not used that year.
Raimi basically said “Fuck it, I’ll give them what they want, but I won’t enjoy it” and we got the confused mess that is Spider-Man 3.