its the files needed to contain the games where it gets grey. Its 100% possible to purchase a game, rip the games contents into a file, and have the emulation program play the file. All legal.
Obtaining said file from someone else, not having purchased the game?
Jack Sparrow.