Speaking with the Hollywood Reporter on all things Strange, the explanation is as follows:
I think it was a human error. He saw Peter as a fellow foot soldier and then as a teenager going through a very formative experience of not being able to be his true self because of being exposed, and having lost a mentor, Strange decided to step in with a gesture of pretty good intention.
People seemed to think that it was a very cavalier thing to do. Everyone forgets that Peter interrupted the spell many times. That lets it in. Peter has the ability to change the spell with his words. It's not really a mistake. He wants to help Peter. If he didn't want to help another superhero, what kind of superhero would he be?
People make mistakes. The actor is correct that superheros would want to help their fellow superheros even if they were both dead, even if Strange doesn't seem to have any real affection for Peter. No one is saying otherwise.
The problem is that Wong told him the magic was too dangerous, Strange did it anyway, and he wasn't competent enough to prevent a teenager from messing up the spell. He couldn't have taken Peter away or something. Can Doctor Strange be defeated only by talking to him? Yes, in No Way Home.
The spell was done very cavalierly, it was half-assed, and then Strange left Peter to clean up the mess. Even if Strange had the noblest of reasons underneath his dickish demeanor, he still managed to be an asshole and bad at his job. That is the problem. It led to a very entertaining movie.
Do you want more io9 news? Check out when to see the latest movies from Disney and Lucasfilm, what's next for the DC Universe on film and TV, and everything you need to know about House of the Dragon and Lord of the Rings: The Rings of Power.