If you open a 3DS cartridge, you get a little board. There is a NAND (IIRC, but it can be a ROM) on it. 3DS files are dumps of this NAND.
Sky3DS just emulates the 3DS cartridge and NAND.
Gateway works in a totally different way. I don't know how.
Actually the file is the NAND contents. So, nothing else is handled by the Sky3DS (except for the buttons switching/SD card reading). Oh, and I almost forgot, most cards have a really tiny storage for save data. So Sky3DS simulates that too.
The 3DS rom is a 1:1 backup of the NAND contained in a cartridge. It was not edited in any way. In a way, the Sky3DS just imitate the nand of a real cartridge. The difference is that you can change what is on that NAND, a thing that, obviously, is not possible with a real game.
The removal/insert process is just the time during the switch. The Sky memory go blank, the Sky loads up another game and copy it to its nand/memory, the system acts as the user just change a cartridge.
The main part of the Sky3DS thing is the hardware and how does it work to change the game in detail. Things that we wrote are just simple observations. There is work to find how the cartridge really work, how they have to emulate it, which hardware they should use, what they should add to turn a simple "fake cartridge" into a fake cartridge that allows to load every 3DS games.
Companies like to make money. Especially when there's only one possible product and no real competition. So you either buy the real thing, or you buy an overpriced product that still saves you money in comparison to the total cost of the amount of games you'll be able to play.
I don't really know about hacking and coding, but from what I hear, 3DS send a unique code to every 3DS cart to confirm if it's genuine cart.
Sky3DS cart imitate this code and send it back to trick 3DS that it's genuine cart. Gateway3DS on the other hand, using an exploit in 3DS system and make it send a different code they make so it can recognize their cart and run everything on it.