This doesn't work for some fairly obvious reasons.
Improvised weapons don't say they have any special traits, like Heavy, or Ranged. The improvised weapon entry says you either use an existing weapon to represent the weapon (like a Club, if you were using a longbow to hit someone on the head rather than fire arrows), or you use it as something that bears no resemblance to a weapon (like a boot) and it does 1d4 damage (and if thrown has some range, too). The text doesn't say it gets any other traits, so why would it.
Ranged attacks are defined in the text in a few ways, including as a weapon entry. Beating someone over the head is not a ranged attack.
It's also not good optimization.
Taking -10 to hit in a bounded-accuracy system can only ever possibly work out if you have multiple rolls, the enemy has very low AC for its level, and you are quite high level. At which point the +20 damage is not particularly exciting. This is not successful optimizing.
Even if it didn't require you to completely misread standard english, ignore the obvious intent of the rules, and create new rules entirely from whole cloth ('if a longbow is used as an improvised weapon, that improvised weapon gains all the traits of the longbow') it would still be bad optimization because all it does is ensure you miss repeatedly. A truly maxed out fighter with every possible bonus (20 str, archery style, full proficiency) has about +10 to hit total at level like, 10. Assuming he's got a flanking buddy for his Sick Longbow Attack he's going to roll twice at +0 to hit a level 10 enemies like Naga and Aboleths with 17 AC minimum. So he now needs to get a 17 on either of two dice to hit, to get that +20 damage. This works out to like 1/4 of the time he's hitting, and that's if nothing else goes wrong. So it's 1/4 of his regular damage, 1/4 of the +20. Instead of doing a 7-or-better-on-two-dice attack for 2d6+5, or 12-or-better-on-two-dice attack for 2d6+15, aka 10 damage or 16 damage on average per swing, he's doing 1d4+5+20 and needing 17-or-better-on-two-dice, aka around 6 damage on average. He also needs two extra feats to do it (tavern brawler and sharpshooter), which means he's very likely to either not have a 20, or not have proficiency (or even both).
So vs an unoptimized member of the same class he does less damage. If he doesn't have a flanking partner, his numbers get worse comparatively. If he doesn't have both 20 str and proficiency, his numbers get worse comparatively. This isn't compared to actually optimized builds - the assasserer, aura cleric, or necrotheurge blow these kinds of silly numbers out of the water entirely.
Keep in mind the outcomes of these kinds of decisions, basically. If someone actually wants to make the world's dumbest and least optimized fighter, then like.. potentially just let them? They'll have fun with their stupid '''build''' (or more likely, get bored of never hitting and want to change) and nothing of value is lost. The bigger problem is people not focusing on the 'roleplaying' part of 'roleplaying game' rather than something like this.
There's a lot of hysteria about 'evil munchkins!' in 5e community, in reality 5e is not very conducive to minmaxing and the vast majority of it is stealth minmaxing - stuff that looks very boring and low-impact on the surface but is ultra-reliable under the hood and basically ensures a character can never truly die or lose.