That's just how wars are named, it's not some grand conspiracy. It was the War in Iraq, the War in Afghanistan, the Vietnam War, the Crimean War. They don't call it the War on Ukraine either.
My guess is that “War in Iran” can be seen as a neutral name. It is literally where the war is taking place. Whereas “War on Iran” assumes the perspective of one of the sides even if it may be a more accurate description. Sort of like how people in Vietnam don’t call it the “Vietnam war” because that would not make sense from their perspective but it does make sense from a neutral perspective.