Peter didn't know what made him go to the superior's tower for help. None of their previous interactions made him think the man wouldn't just give him over to the Sinister Six, or whatever they called themselves, maybe he would even kill Peter himself. Spider-man has always an annoying pest to the man after all. But he was bleeding heavily with multiple broken bones and nowhere else to go before he passed out. Which he promptly did, right on the superior's balcony, specifically right on the man's lap due to his web-shooters breaking before he could land properly.
If he was honest with himself Peter didn't think he would wake up after that, much less wake up in a, no doubt extremely expensive, bed with his injuries cleaned and bandaged.
Panic welled up inside him. The superior iron man, aka Tony Stark the man with an omniscient AI, knew what he looked like and no doubt had found out everything about Peter Parker. Everyone he cared about was now in danger because he was stupid enough to fall into a trap where the only possible point of safety was a supervillain's home.
But then the man surprised him, he acted nothing like any other supervillain would after discovering Spider-man's secret identity. Oh Peter still didn't trust Stark as far as his Aunt May could throw him but it was nice, not feeling the need to hide a part of himself as he healed. And having someone he could talk to about his activities as Spider-man without having to censure what he says about himself.
As the days went by and Peter healed he found himself enjoying the time he spent with Tony more and more. The older man seemed to genuinely like him and Peter realised he could honestly say he felt the same. It's just a shame the man was a villain. Although as they talked Peter found himself agreeing more and more with the man about some of the reasons for his missions.
And compared to some of the things SHIELD and their so called heroes did Tony's actions didn't seem that outrageous. They almost always lead to less or even no civilian casualties than whenever Captain America and the Avengers were sent out on SHIELD missions, in fact most of the casualties that happened during their battles always seemed to happen when the Avengers came on the scene. Whenever he fought Tony by himself there was never anything like the number of deaths caused, often there weren't any.
So when a few weeks later Tony declared him healed and ready to return home Peter had made up his mind. The pair of them obviously like the other so why couldn't Peter stay a while longer? It wasn't like they were really on opposite sides any more now were they.
There weren't many things that could shock THE Tony Stark, but Peter's declaration that he was on Tony's side seemed to be one such surprise. But a pleasant on if the older man's smile was anything to go by