Crocodiles do produce tears. Because, while eating, they swallow too much air, which gets in touch with lachrymal glands (glands that produce tears) and forces tears to flow. But it is not crying. The term "crocodile tears" (and equivalents in many other languages) refers to a false, insincere display of emotion, such as a hypocrite crying fake tears of grief.
The term is derived from an ancient anecdote that crocodiles weep to lure their prey, or that they cry for the victims they are eating, first told in the Bibliotheca by Photios I, who was the Ecumenical Patriarch of Constantinople. This tale was first spread widely in English in the stories of the Travels of Sir John Mandeville in the 14th century and appears in several of William Shakespeare's plays.