Every Marvel fan knows that there are a few plotholes in the MCU, but as a fan, little inconsistencies are easy to ignore. One thing that impossible to ignore is the fact that Iron Man can be a jerk. Over the course of a decade, Tony Stark has managed to fuel the MCU's black market weapons trade, he’s inspired a cavalcade of evil copycats to build their own robot suits, and he’s ultimately responsible for Earth being attacked multiple times.
Tony Stark is the catalyst for most of the problems faced by the Avengers. By putting his face out in the open as the identity behind Iron Man, he put a bullseye on Earth. No wonder aliens keep trying to destroy the planet.