Reaching there for Sandman and Doc Ock
Neither of them had any reason to leave (or in the case of Sandman betray Peter) and Octavius was properly cured the first time.
Sandman wanted to go back to his daughter, but Peter only wanted to send them back after he cured all the villains. So when Goblin fucked up Peter's plans of healing everyone, and they all escaped, Sandman had no reason to believe that Peter would be able to deal with all those 4 fuckers alone, heal them, and then send them back (remember, Peter could only send them all back together). So Sandman decided to get the Relic from Peter, to activate it himself, because he wanted to go back. Remember, Sandman had to help Peter just to defeat Electro, 2v1, and you think Sandman should just believe Peter would be able to take on all of them? He couldn't risk one of the villains killing Peter, taking the Relic and just going away with it.
Doc Ock didn't just leave, he was attacked by Electro, he blastered in the face and thrown off the building, so he ran, the dude is a fucking scientist, not a fighter, it was his arms AI that made him agressive and fight against Peter before that. And he knew there was 4 villains going ham, why would he stay? imagine being a old scientist with 0 fight experience and you expect him to stay to fight 4 super powered villains? in the end he comes back, but again, he doesn't really fight, he just tricks Electro into thinking his on their side, and then just turns and puts a device on Electro. He helps Peter because Peter fixed the AI shit on his arms, and let him think.