Double-sided door locks have a keypad on both sides (the inside and the outside), so you have to enter a code to open the lock from either side.
These are often used on gates that you can reach through and get to the handle on the other side.
It's also important to have a lock on both sides of your gate for gates that are short enough to reach or climb over.
The codes on a double-sided lock can be the same on both sides or you can use a different code—it is completely up to you. You can even make the inside code shorter since you usually don't need as much security on the inside.