Something that I should probably clarify at the beginnings of my Hobbit theory essays is what a "fan theory" is. The best definition that I can think of is that it's an idea regarding something in a film, show, book, or some other storytelling medium that members of the fanbase choose to believe even though that idea is typically not the intention of the original creator. Fans conceive such ideas for various reasons, sometimes to fill in plotholes or to connect things in the narrative that seem like they could fit together, but the purpose of most fan theories is to provide a more interactive way of enjoying a story. We like to feel as if we contributed something to our favorite films, shows, books, and so forth, and putting together evidence to support our theories can make for a fun brain exercise.
With that said, I want to present another fan theory about the Peter Jackson Hobbit films: that the dwarves of Thorin Oakenshield's company wrote and rehearsed the song "Blunt the Knives" prior to meeting Bilbo Baggins.
This theory could perhaps apply to the book as well, but I'll be discussing it mainly in the context of the movies. That's because the song's inclusion is a bit more conspicuous in the film adaptation.
By in large, the six Peter Jackson Middle-earth movies try to ground the stories of The Hobbit and The Lord of the Rings in reality more than the books do. The animals don't speak for the most part, uses of magic are depicted very subtly, and aside from a few goofy combat physics (mostly on the part of the mystical elves), the characters don't bend the laws of time and space too much. Considering this, it's a bit jarring to see twelve dwarves break out into an improvised, well-timed song and dance number where everyone sings along in perfect harmony and knows every word. When does that ever happen outside of a musical?
It's easy to believe other singing scenes in the Hobbit movies, namely the dwarves' renditions of "The Misty Mountains Cold" and "The Man in the Moon Stayed Up Too Late," but that's because we can assume that they've known those songs for a long time and have probably sung them before. This leads me to wonder if perhaps the song "Blunt the Knives" wasn't improvised after all, but was in fact another piece that the dwarves knew well before performing it.
They would have had the time to compose it; Gandalf decides on the morning of the Unexpected Party that he will send the dwarves to Bag End, and they don't arrive there until late in the evening. Furthermore, the first dozen arrive at roughly the same time, which could mean that they spent a good portion of their journey from the Blue Mountains to the Shire traveling together. A trip that long can get boring, and since Middle-earth dwarves are shown to be musically inclined, the twelve of them could have easily come up with and memorized a song about their soon-to-be host along the way. They would know his name, since Gandalf says that morning that he will "inform the others" of Bilbo's inclusion on their quest and Kili almost says it correctly upon meeting Bilbo.
The song's lead-in at the party is also somewhat suspicious. Right in the middle of their rowdy celebration, the dwarves all start pounding their silverware on the table in perfect rhythm until Bilbo complains that they'll blunt them, then the dwarf Bofur very slyly relays this concern to the others. It's as if they were deliberately baiting Bilbo into saying something close to their song's opening line and then Bofur cued everyone to start singing it. This begs the question of whether all of their rude behavior before that really was plain ignorance or actually one big act to get Mr. Baggins fired up.
The next question is why the dwarves would want to tease him so thoroughly. Most likely, it's because Gandalf mentioned while informing them of Bilbo that the hobbit was sort of a stick in the mud. The wizard makes it clear while talking to Bilbo that morning that he's unhappy with the way Belladonna Took's son has turned out, so he probably conveyed that unhappiness to the company and painted a less than flattering picture of the halfling. This may have given the dwarves the (correct) impression that they wouldn't be welcome in Bag End, so they may have decided to give Bilbo the same treatment that they give to most hosts who don't appreciate their company.
Just look at their behavior in Rivendell later: they make a mess at the dinner table, sing a song that the elves clearly don't like, eat them out of house and home, trash the furniture, and do something in a public fountain that probably also caused a few plumbing issues.
Compare that then to their respectful behavior in the house of Beorn, a giant skin-changer who makes a habit of tearing apart unwanted visitors, and their reverence in Erebor, the home of their forefathers. Dwarves are entirely capable of civility, but they'll be stubborn and proud if they can afford to be. If they pick up any holier-than-thou vibes from someone and believe that they can get away with a few pranks, they'll gladly entertain themselves at that person's expense. Writing a song about ruining said person's belongings is one of the tamer things they can do.
With that said though, they seem to like Bilbo a lot more than they like the elves. Why else would they clean his dishes after all was said and done? If "Blunt the Knives" was a pre-written prank, then it was obviously meant in good nature. It's almost flattering, really, that the dwarves went to the trouble to compose a song specifically about Bilbo instead of just singing any old tune. Maybe like Gandalf, they sensed that the hobbit wasn't as prim and proper as he tried to be and just wanted to nudge him out of his shell a little.
Dwarves just nudge a little harder than most folk, as we all know.