No one knows for sure where the expression "crocodile tears" originated, but Shakespeare himself used the phrase to describe insincere sadness, a false display of emotion intended to manipulate one's audience.
In 1225, in his encyclopedia of natural sciences, Bartholomeus Anglicus wrote that after killing a human, crocodiles weep over the slain body, then proceed to devour the corpse. Such fables, of course, say more about human fears than about crocodile behavior, and searching for the roots of the folklore in biological fact yields few clues. Although crocodiles do secrete small amounts of a protein-rich fluid to lubricate their eyes, they don't shed true tears at all.
Quite apart from the crocodile lore, crocodiles share an interesting physiological feature with marine turtles and other reptiles. To maintain their bodies' salt and water balance, crocs and marine turtles have special salt glands that secrete a very concentrated salty solution. This allows them to get rid of extra salt, when they need to, without losing too much water in the process.
All reptiles, and all mammals, for that matter, need to regulate the salt in their bodies. However, it's especially important for reptiles living in saltwater environments, who take in sea water with food and constantly have to get rid of that extra salt.
In marine turtles, the salt glands are actually special tear glands. Crocodiles, on the other hand, have special salivary glands along their tongues to do the trick. So, it's not crocodiles, but marine turtles that cry crocodile tears, without regard to emotion. Luckily, modern biology hasn't set out to rewrite the folklore. "Marine turtle tears" just wouldn't have the same ring!