Dementors are blind, they can sense people but they cannot differentiate one person from another.
But Crouch took another deep breath and continued in the same flat voice.
“The dementors are blind. They sensed one healthy, one dying person entering Azkaban. They sensed one healthy, one dying person leaving it. My father smuggled me out, disguised as my mother, in case any prisoners were watching through their doors.
Harry Potter and the Goblet of Fire, Chapter 35, Veritaserum
This means that the dementor did not recognize Crouch Jr. It basically leaves us with two probable causes for this.
1. Fudge or somebody else in the ministry ordered the kiss
“When we told Mr. Fudge that we had caught the Death Eater responsible for tonight’s events,” said Snape, in a low voice, "he seemed to feel his personal safety was in question. He insisted on summoning a dementor to accompany him into the castle. He brought it up to the office where Barty Crouch -”
“I told him you would not agree, Dumbledore!” McGonagall fumed. “I told him you would never allow dementors to set foot inside the castle, but -”
“My dear woman!” roared Fudge, who likewise looked angrier than Harry had ever seen him, “as Minister of Magic, it is my decision whether I wish to bring protection with me when interviewing a possibly dangerous -”
“By all accounts, he is no loss!” blustered Fudge. “It seems he has been responsible for several deaths’.”
Harry Potter and the Goblet of Fire, Chapter 36, The Parting of the Ways
Fudge knew a death eater responsible for murders has been caught. This would have brought anxiety to people, especially after the events of Quidditch world cup and raise doubts about his leadership skills. So it made sense for him to get rid of Crouch Jr.
“’Course,” said Hagrid. “They wanted Dumbledore fer Minister, o’ course, but he’d never leave Hogwarts, so old Cornelius Fudge got the job. Bungler if ever there was one. So he pelts Dumbledore with owls every morning, askin’ fer advice.”
Harry Potter and the Sorcerer's Stone, Chapter 5, Diagon Alley
But we also know from the books that Fudge is not one of the brightest minds, so there is a probability that somebody else inside the ministry would have ordered the kiss. This is similar to what happen in Harry Potter and the Order of the Phoenix, where an Dementor attacked Harry and Dudley on commands from ministry of magic.
2. Dementor acted on its own accord
Sirius Black mentions that Dementor can sense emotions.
Dementors can’t see, you know...” He swallowed. “They feel their way toward people by feeding off their emotions...
Harry Potter and the Prisoner of Azkaban, Chapter 17, The Servant of Lord Voldemort
Crouch Jr. having spent some time in Azkhaban might have shown emotion like fear which might have attracted the Dementor towards him. Secondly Dementor would have know that person in the room had escaped from Azkaban.
There are two instance in the cannon which have shown that Dementors are not tamed, that they can take action on their own.
Dementor Attacked Harry:
“They’re getting hungry,” said Lupin coolly, shutting his briefcase with a snap. “Dumbledore won’t let them into the school, so their supply of human prey has dried up... I don’t think they could resist the large crowd around the Quidditch field. All that excitement... emotions running high... it was their idea of a feast.”
Harry Potter and the Prisoner of Azkaban, Chapter 10, The Marauder’s Map
Dementor tried to kiss Harry:
“Oh yes, they’ll have to go,” said Fudge, running his fingers distractedly through his hair. “Never dreamed they’d attempt to administer the Kiss on an innocent boy... Completely out of control... no, I’ll have them packed off back to Azkaban tonight... Perhaps we should think about dragons at the school entrance...”
Harry Potter and the Prisoner of Azkaban, Chapter 22, Owl Post Again
This instance looks more like an Dementor taking matters into it's hand.