Ever thought "how in the Hell did they come up with a name like that?" The short answer is, more than likely, a combination of drugs, stuff lying around, and/or drunken/stoned shenanigans. But some bands have pretty interesting stories behind how they got their names.
Black Sabbath
What do an old Horror movie, a blues-jazz band out of Birminham, UK, and talcum powder have to do with Black Sabbath?
Sabbath, before they really hit it off, was just a touring blues-rock band in the Birmingham area, going under a variety of names. The pre-Sabbath moniker was Rare Breed, and featured Tony Iommi, Geezer Butler, Ozzy, and Bill Ward. After a couple of gigs, they enlisted a saxaphonist and a second guitarist, under the name The Polka Tulk Blues Band (this proves my point above, Polka Tulk is was off a talcum powder bottle Ozzy found in his mother's bathroom). Iommi very briefly left and played for Jethro Tull, and then they reformed, sans second guitarist and sax, under the name Earth. They kept getting confused with another local blues act called Earth in the area, and thought of a name to change to. While they were lazing about, they noticed a line out the door for a horror movie. Geezer mused "strange that people spend so much money to see scary movies." They thought it was a good idea, and made it into the title of a song, which then became their name.
The movie? Boris Karloff's Black Sabbath.
Guns n' Roses
How did two tangentially related bands give their name to one?
The initial lineup of Guns n' Roses consisted of Axl Rose, Izzy Stradlin of Hollywood Rose, Tracii Guns, Ole Beich, and Rob Gardner of L.A. Guns. However it came to be that all the members from the "Guns" side of the equation were replaced, by Slash, Matt Sorum, and Duff McKagan, respectively. They were all kept out because they would rather get high/laid/lit/shitfaced/whatever-euphemism-you-prefer, and were all kicked out by then-band-leader and then-pillar of responsibility Axl Rose.
Fun fact: Every song off Appetite For Destruction was either about drugs, sex, Axl Rose's girlfriend, or all of the above. Axl broke up with his girlfriend not too long after "Sweet Child o' Mine", dedicated to said girlfriend" was released as a single.
Dream Theater
How are YtseJam Records and Dream Theater related?
The original lineup Dream Theater, with Mike Portnoy, John Petrucci, and John "The Silent One" Myung, started as a jam band covering Iron Maiden and Rush at Berklee College Of Music. The originally got their name while waiting in line for Rush tickets. Mike Portnoy quipped that the song Bastille Day sounded "majestic". And so the band Majesty formed. They filled out the band with keyboardist Kevin Moore and vocalist Chris Collins, whom they recruited after they heard him belt of Queensryche's Queen of The Reich. After a couple of lineup changes and a really successful demo tape, they were contacted by a band out of Vegas called Majesty, who threatened legal action if they continued using the name Majesty. They couldn't come up with a good name, until Portnoy (again) mentioned that his dad owned a small theater in California called the Dream Theater. And history was made. Mike Portnoy still sells live bootlegs of Dream Theater sets and their original Majesty demo under his YtseJam label, which is just Majesty backwards.
Others are a lot more mundane.
* Rainbow was named after the Rainbow Bar And Grill in Hollywood.
* Deep Purple was named after Ritchie Blackmore's grandma's favorite song.
* Judas Priest was named, and I shit you not, a Bob Dylan song called The Ballad Of Frankie Lee and Judas Priest.
* Kyuss was named after a monster in the 1st edition of Dungeons and Dragons.
* Rush was coined by then-drummer John Rutsey's older brother, commenting on their rush to find a new name.
* Tool was picked by Maynard James Keenan because it was a nickname for penis. No, really.
* Soundgarden was name for a sculpture in Seattle called "A Sound Garden".
* AC/DC got their name off a sewing machine. No one in the band knew what it meant until after they chose the name.
* Pantera was originally called Pantera's Metal Magic, back when Dimebag Darrell was called Diamond Darrell, and they played really cheesy glam metal. the name was shortened by the label.
* Alice In Chains came Layne Staley's glam metal project Alice n' Chainz. It changed before they hit it big, but bootlegs of the Alice N' Chainz-era pop up on eBay occasionally.
* Bolt Thrower is named for the quite frankly gigantic guns Space Marines wield in Warhammer 40k. Lots of their album artwork and lyrics, especially their album Realm of Chaos, come from Warhammer 40k, or in the case of artwork, directly from the creators Games Workshop.
* Buckethead, because he wears a KFC bucket on his head. Wierd, huh?
* Queensryche came from the observation that few bands have names that began with Q, and a bastardization of their first big hit, Queen Of The Reich.
* Metallica came as a suggestion from Lars Ulrich's friend when asked for names. Other names included MetalMania.
* Megadeth came from a pamphlet going out against nuclear proliferation Dave Mustaine found on the floor of a bus after getting kicked out of Metallica. He said the name represent an annihilation of power, which is a bastardization of the term megadeath.
* Motörhead came from the last song Lemmy wrote for the band Hawkwind before getting kicked out, which in turn was about meth. Lemmy has gone on record that he wanted to be that band that if they moved next door "we would be so loud, your lawn would die."
* Queens Of The Stone Age came about from Josh Homme's stoned ramblings, much the same for the bands Eagles Of Death Metal and Them Crooked Vultures.
* Sepultura is Portuguese for "grave".
* Slayer, as the urban legend goes, was originally named Dragonslayer, though guitarist Kerry King denies it.
There you have it. The origins of a bunch of bands.