1. Earliest use in the neutral sense of speedy in "Dear Mr. Banker", by Nicholas P. Mitchell, published in The Greenville News of January 14th 1950:

"By the way, in spite of the fact that various Greenville bankers have explained to me why it isn’t a good idea, I still wish every bank had at least one teller’s cage reserved for people who want to cash a check or to make an individual deposit. Such transactions require about half a minute, but it is not unusual to wait in line fifteen minutes or more while those who are banking on behalf of business get their requirements met. ... But if we small fry had a “wham, bam, thank you ma’am,” line of our own, we’d all save a lot of time."

The phrase merely referred to suddenness before it was used as a slang for quick sexual intercourses.

2. The earliest occurrence of wham, bam, thank you ma’am with reference to sex is from the review of Ball Four (World Publishing Co. – New York, 1970), by the American baseball player James Alan Bouton, hence 20 years after its first use as an adjective. Bouton's review was published by John Justin Smith in the Star-Gazette (Elmira, New York) of June 10th 1970:

"Bouton says of ball players that they are not, by and large, “the best dates. They prefer wham, bam, thank you, ma’am affairs.”

3. It's used in the military to denote a sudden, forceful effect. Feel free to also use it to denote any sudden, quick action or effect, not just sexual ones. The intended meaning is highly contextual.
"One of the most impressive things in the book is the lightning suddenness with which capital ships destroy one another. Wham! Bam! Thank you ma’am—and there goes a few hundred millions of somebody’s money to Davy Jones’ locker."
by Claude Eckel July 30, 2021
Get the Wham! Bam! Thank you ma’am mug.
thank you for the happiest year of my life
thank you for the happiest year of my life
by sped demon January 27, 2023
Get the thank you for the happiest year of my life mug.
if someone gives unnecessary comments that you didn’t ask for you can deal with it with sarcasm:) and humor!
lif someone was like ewww! that person stinks you could say “thank you for your city your frank
by Sarah._.26353 March 17, 2023
Get the Thank you for your city your frank mug.
When you are trying to be nice but are low key pissed. This may include saying this word just to be nice but, secretly your not thankful.
“Here i brought you food!” “Thank you bitch.”
by hello_kitty1 April 7, 2019
Get the thank you bitch mug.
When used with a screenname, a good way to point out a probable troll. Especially useful in a long comment war, when you can see that people are taking things way more seriously than they were probably intended.
Thank you, Cirke, very cool

Thank you, MasterBaiter, very cool

Thank you, NotAFed, very cool

Thank you, very cool, YoMamma
by RecoveringKaren June 20, 2023
Get the Thank you, very cool mug.