The microwave I recently dealt with was designed with the cord coming out the middle of an unfinished top. This microwave was clearly intended to be hung under a cabinet, with the cord passing into the cabinet - something specifically called for in the instructions. Darn near impossible to do otherwise.
As for stored stuff tripping over the cord ... not only is that upper cabinet nearly useless due to height ... most of it is devoted to letting the stove exhaust fan ducting pass through. It's pretty much a useless cabinet - more of a decorative front to hide the ductwork!
I think that into the cabinet is as good as it will ever be.