Mostly it has to do with character recognition. Your average fan - hell, your average
kid - is more likely to like, or at least recognize, a character
(re: buy the toy) if it's a name they know. It also further connects that character to already established parts of the brand, so if a dude is named Starscream, regardless of what franchise he's in (
usually), you
know he's going to be treacherous, deceitful, scheming little so-and-so and have a very disproportionate amount of fan fiction written about him. Usually by fangirls.
Of course, there are times when a legacy name is just slapped on a toy for odd reasons, such as
trademark protection (which is the other major reason Hasbro reuses names: to keep their hold over their trademarks) or just to
fuck with people.