The key is, "false implies X" is always true, no matter what X is (the Principle of Explosion, aka Ex Falso Sequitur Quodlibet in Latin).
So let's say we have a farmer who owns a donkey and doesn't beat it. Whatever formulation we use, we expect it to return false for this. Set x to be this farmer.
Now, the quantifier on y means the statement is true if I can find any value of y that makes it true. I set y to be the Sun.
Now the statement is:
(farmer(x)=TRUE and donkey(y)=FALSE and own(x,y)=FALSE) → beat(x,y)=FALSE
The left side of this implication is false. And since false implies anything, the whole thing is true. But we don't want it to be true, since this farmer has a donkey and doesn't beat it. So the formulation is wrong.
To fix it, you need to change the quantifier on y to be universal ("for all"). This is equivalent to "for every man and every donkey, if the man owns the donkey, he beats it".