It's your own authority building efforts such as building quality backlinks and good quality content and creating a friendly URL structure for your overall site that caused your site to get indexed well and enjoying good rankings, really... it's not the .com extension that caused this to happen in any way.
You may perceive it this way, that the .com extension had any influence, but it's not, it's a mix up of misunderstanding cause and effect.
Which is the cause for many people thinking that .edu or .gov domains have by definition a priority card in the eyes of search engines as well.