Sometimes people are referring to mechanical objects as "she":
I love my car. She always gets the best service.
Are there any rules when it is appropriate to use "she" instead of it, and is "he" ever used in such context?
"He" in reference to an inanimate object has not, as far as I'm aware, ever been common usage in English.
The reason why cars and alike are called "She" is because ships are made from Female oak, being that the wood is much stronger than the male oak... This I was told by a ship builder many years ago... Basically anything Mechanical is now referred to as "She"
First off, you're trying to find a "rule" that predicts what human brains will do. Humans tend to do what they like and they don't like rules. "As many exceptions as rules", etc.
That said, the English practice of referring to inanimate objects as "she" appears to concentrate in areas historically dominated by males (navies, military, locker-rooms, car-repair shops, etc.)
Objects referred to as "she" by those groups tend to have the following characteristics:
As the objects are seen as both required for survival and likely to kill them, males tend to supersticiously think of the object as feminine. This allows them the hope that the object might be subject to cajoling and/or flattery as a means of increasing their odds of survival.
Regarding the usage of "he" in place of "she", this is possible as a backlash against the typical "she" usage:
This isn't really "common", per se, and really only serves as a Take That against men's use of an inanimate she.
Another borderline exception is the Judeo-Christian God:
The non-gender aspect of God is a much heated topic and the non-existence of a gender neutral pronoun forces people to choose male or female. Another backlash occurs when authors purposefully swap it:
This also serves as a Take That but more directly targets the male dominated leadership of the modern church. That being said, this doesn't quite satisfy your query since God is typically seen as animate and personal. "It" wouldn't really feel right.
The only place you will traditionally invoke an inanimate he is when you are referring to a specific entity and wish to anthropomorphize it with typical male emotions and traits. Note the difference in style:
Tornado may not be the best example, but each of these will bring slightly different connotations to mind. "It" is an abstracted, non-personal usage that attaches no emotion to the act of destruction. "She" would attach emotion and the range would include those of a mother, lover, seductress, fate, siren, dream, etc. "He" would more accurately invoke those of a competitor, warrior, challenger, father, master, protector, etc. While each range across all potential emotions, the source and reasonings will differ.
Take, for example, the subject of revenge. Examples motivations of traditional feminine revenge include unrequited love, payback for broken physical vanity, a betrayal of a son, jealousy, or gossip. Masculine revenge is more relevant for slavery, theft, murder, physical assault, or disrespect. Do note that these are gross generalizations and some great stories involve the exact opposites of these — for instance, a man vowing revenge on the one who scarred him. I only list them here to point toward why one would use "he" instead of "she".
Namely, the use of "he" would be apt whenever you would obviously turn an object into a specifically male entity if it actually had a gender. For instance: Moby Dick, as a car, would still be male. If you represent a car as an analogy for Moby Dick, it would be apt to use "he". You wouldn't have to but you could pull it off.
To come back to the male tornado: He may feel larger, slower, more angry and much more likely to sit around and individually smash - every - single - house by tossing them one by one into a nearby mountain.
Or not. All of this is entirely subjective, which is entirely the point.
Gender is also used in English to refer to certain abstract ideas or institutions. For example, 'The Church always protects her own', or 'Justice unleashed her judgement'.