This leads me to my own personal fan theory about The Desolation of Smaug: that Bofur being left behind in Laketown is supposed to feel contrived because in the context of the movie, it was contrived. My theory is that the other dwarves left him there on purpose.
Why would they do that? The answer, I believe, lies with the person who most likely would have orchestrated the whole plan—Thorin.
Looking at his interactions with Bofur before that, it's easy to come up with a motive for the King Under the Mountain. For starters, Bofur doesn't seem to take Thorin all that seriously as a leader. He follows orders most of the time, even if he's not always thrilled with them, but when there's danger afoot, he makes his own judgement calls without waiting to hear what Thorin thinks.
Take for instance the warg chase from An Unexpected Journey. After the company takes cover from their pursuers in a cave, they discover a tunnel, which Bofur immediately declares they should venture into. The rest of the company obeys this direction without so much as consulting Thorin.
The end result of this is their arrival in Rivendell, where the elves and the White Council try to put a stop to their quest. This is a situation that Thorin's been trying to avoid from the very beginning of the journey, and Bofur more or less led their group into it.
There's another instance of Bofur overstepping his bounds at the beginning of The Desolation of Smaug. Upon learning that their company is in the vicinity of a giant, man-eating bear, he suggests to everyone that they turn around and go back the way they came. This time, however, Thorin dismisses the idea before it's considered.
This seems to show development on Thorin's part. He's aware by now that Bofur has a habit of going over his head and leading the group into troublesome situations, so he's ready to keep it in check. As we see though, Thorin becomes more desperate and obsessed with reaching Erebor the closer their deadline grows, and he becomes quicker to cast aside problematic group members than he is to deal with them. If he's willing to exclude his injured nephew from the home stretch of their journey, he's probably more than willing to exclude an apparent loose canon like Bofur.
Thorin's motive could also pertain to his plan for after he finds the entrance to Erebor. His intention is to send Bilbo into Smaug's lair alone to steal back one key piece of treasure while the dragon is sleeping. The other company members, being dwarves whose smell Smaug will recognize, are supposed to wait outside of the mountain the entire time. If something should go wrong with this plan, there's a very good chance that the hobbit and possibly the dwarves will be killed.
It's no secret to Thorin by the time they reach Laketown that Bofur is attached to Bilbo. He's there when Bofur tries to save their burglar from the cliff on the Misty Mountains, and we see him eavesdropping on the conversation in the cave where Bofur wishes Bilbo "all the luck in the world." Furthermore, he's the person that Bofur asks about Bilbo's whereabouts when the dwarves are captured by elves in Mirkwood.
Thorin has probably also noticed that the insolent dwarf tends to lose his head whenever Mr. Baggins is in danger. Bofur has to be pulled to safety himself at one point during the stone giants' battle while trying to keep Bilbo secured, and when the hobbit almost falls from the cliff, Bofur doesn't just throw himself over the edge to try and grab him. He also commands Ori, the youngest dwarf in the group, to do the same.
Given all of this, it's conceivable that Bofur might charge into Smaug's lair to rescue Bilbo at the first sign of trouble, which could have a disastrous outcome for everyone present. Thorin would never take a chance on something like that happening. It's doubtful that Bofur would obey an order to stay in Laketown, and since having him detained there might make him even less cooperative in the future, Thorin's best option would be to make his leaving-behind appear accidental.
If that is the case, then why would the other dwarves go along with that plan? They all seem to like Bofur, and while they may be anxious to reach the mountain and take back Erebor too, I don't think they're as keen as their leader is to accomplish their goal through deception. The most likely explanation is that Thorin told them it would be for Bofur's own good, for all of the previously mentioned reasons. It may have helped his argument that Bofur appeared to be hungover on the morning that they left Laketown. The other dwarves didn't want their reckless friend/brother/cousin to get hurt or killed, so they agreed not to wake him as they were preparing to leave.
Bilbo seems to have been left out of that conspiracy though, as he's the only person to ask where Bofur is on their way to the boats. It's possible that since he's so close to the dwarf and the others don't know him well enough to predict how he'd feel about such an idea, they decided it was best to just keep the hobbit out of the loop. Either that, or they figured Bilbo had enough to worry about that day as it was.
This leads me to wonder then what the screenwriters' other purpose was for keeping Bofur in Laketown, besides raising the stakes during Smaug's attack. Philippa Boyens has said on numerous occasions that they wanted his character to see that attack so he could come more into his own in The Battle of the Five Armies. That arc didn't make it into the film's final cut, but if it's restored in the Extended Edition, could the above theory play a part in it?
It would be easy enough to work into the plot. Perhaps in the excitement of their reunion, one of the other dwarves (the usually silent Bombur, perhaps?) could let it slip to Bofur that Thorin told them to leave him behind. This combined with their leader's refusal to help the Laketown survivors could cause Bofur to lose what little respect he did have for Thorin, prompting him to actively oppose the new dwarf king. Perhaps then Bofur would become the person that Thorin originally suspects of stealing the Arkenstone, and this mounting tension could lead to the alleged cut scene where Bofur sends Bilbo away from Erebor at night to ensure the hobbit's safety.
Once again though, this is just a fan theory. There's no way to determine whether or not any of this was the filmmakers' intent, but a lack of definitive proof rarely snuffs out speculations like these. Some Tolkien readers have believed ever since the 1970's that Gollum killed Frodo's parents, after all. Not knowing the truth is part of what makes fan theories so enjoyable; it inspires that same spark of imaginative storytelling that can sometimes lead to gems like The Hobbit.
All the same, I still hope very much that when the final Extended Edition comes out, Bofur's secret purpose does get included in the final leg of that journey.