'Improvised weapons' are, by definition, not 'weapons' at all, in terms of game mechanics.
An object is either a 'weapon', or it is an 'improvised weapon'; it cannot be both.
It is only a 'weapon' if it is an object designed to be a 'weapon'. If it is an object not designed to be a weapon, then it cannot benefit from anything that requires a 'weapon', like the magic weapon spell or fighting styles.
In fact, the only thing that lets you belt someone upside the head with a 'not-weapon' are the 'improvised weapons' rules. They show how you can use a 'not-weapon' to attack and damage a foe.
Sometimes an object that is a 'weapon' (an object designed to be one) can be used as an 'improvised weapon' (an object that was not designed to be one) by using it to attack in a way that was not designed, like using your longbow to bash someone's head in, or throwing a pistol at a foe after you run out of bullets. "If a character uses a ranged weapon to make a melee attack, or throws a melee weapon that does not have the thrown property..."
It is also possible to treat a 'not-weapon' as if it were a 'weapon'; "At the DM ’s option, a character proficient with a weapon can use a similar object as if it were that weapon and use his or her proficiency bonus". This doesn't mean that the 'not-weapon' is a 'weapon'; it just means that it can be wielded as if it were one. So spells which target 'weapons' would still not be able to target a table leg, but if the DM rules the table leg is enough like a club then you can add your proficiency bonus to your attack rolls with it (assuming your are proficient with clubs) and even use it in TWF (which is restricted to 'weapons').