When someone writes you a check, the bank normally requires you to sign it to receive the funds. With a "For deposit only" designation, the payee named on the account can only deposit it, not exchange it directly for cash. Even you, as the recipient, can't receive cash for the check after you put this restriction on it.
Additional Endorsement Considerations
Most checks have a clearly designated endorsement space on the back side. Some endorsement areas are blank spaces, while others have lines for you to use. The sooner you write "For deposit only" and sign your name below, the sooner you can feel safe that the check won't get cashed if it falls into the wrong hands.