I know, right? It's this neat trick called the Letter of Introduction (or in the case of my very first paid gig, The Phone Call of Introduction).
I *have* contacted publications before, in one way or another, but just not with a query for a specific idea.
I think it's important to note that I don't go around calling national magazines whose guidelines specifically say "query." This is just how it's worked out for me... and good thing too because I froze up at the thought of writing a query. (But thought nothing of emailing to ask outright!)
But local magazines and sometimes newspapers, specialty or niche publications, and definitely corporate or commercial gigs are well-suited to the method of a quick and courteous note or call to introduce yourself and see if they need any freelance writers.
Still. If there are guidelines, no matter how small the pub, I would err on the side of caution and do what they say.
So that's how I've never queried. Before, that is. Because now I have!! Wow. No more being special.