Polydectes heard about Danae and asked her in marriage, but she rejected
him. If it wasn't for Perseus, Polydectes would have married Danae
by force; so the king decided to create a plan to get rid of the young man.
Polydectes pretended to marry the daughter of his friend.
Everybody had to bring a wedding present, including Perseus.
However, Perseus,
being poor, had not brought anything, and Polydectes pretended to be
furious. After a heated discussion, Perseus said he would bring him anything the
king would ask; so Polydectes asked for the head of the Gorgon
Medusa.
His true motive in sending Perseus in the snare is to get rid of him so he could have Danae as his wife.