Why do older generations games have a common look and feel by console?

Much of the "look and feel" of games of that era (up to roughly the early 3D era) was driven largely by technical limitations and tradeoffs of the consoles themselves. The Sega Genesis, for example, could load and scroll backgrounds much faster than other consoles of the era (mainly the SNES and TurboGrafx16), so you saw a lot of Genesis games, starting with Sonic 2's "charge and roll" move, that involved zooming across levels very fast, to show off this capability. The SNES, in contrast, had slightly better capability for layered parallax backgrounds, and better color palettes, so you saw a lot of those in SNES games. The TG16 supported larger, more detailed sprites and a much better sound engine than its competitors, so you saw a lot of games with big, detailed characters and rich extravagant musical scores, that other consoles simply couldn't match. It's the same attitude that today leads to "photorealistic" sports games and boasts of triangle counts: showing off the capabilities of the hardware.

@RobertColumbia also makes a good point in the comments that games produced for only a single console, and companies that developed for a single console, were far more common than they are today, to the point that those companies' "house styles" became associated with the console. Again, this is because the consoles' technical capabilities (as well as cartridge formats!) were so different that porting a game to a different console would have been a monumental undertaking. It did happen, but it was extremely uncommon. First-party games were also more common than they are today (except for Nintendo, of course, which actually had some AAA third-party support at the time but basically doesn't anymore), and the prevalence of first-party games tended to influence a console's style as represented by other developers.