Those keyless fobs have millions ( billions? ) of "rolling codes". This means the code changes each and every time you press it. You get a random code each time, kinda like spinning a slot machine. The key fob and the car "talk" to each other so they are on the same code next time you press it.
One key fob should NEVER open two cars!

-John