Downloading a ROM for a game you physically own is considered a gray area by many, but it is strictly speaking still illegal.
If you own a physical game and rip the contents to make your own backup copy, that’s within your rights, but it is illegal to distribute ROMs. Downloading ROMs from the internet is piracy and subject to copyright infringement. Downloading a ROM for a game you physically own is considered a gray area by many, but it is strictly speaking still illegal.