What is legal but not logical?

A law student who failed exams asked his professor: Sir, do you know everything about law? Professor: Yes. Student: If you can answer this question, I will accept my final marks, if you can't, you have to give me 'A". Professor agreed. The student asked: What is legal but not logical, logical but not legal & neither legal nor logical? The professor thought about it for hours, pondered and finally gave up as he really did not know. He gave the boy his 'A'. The following day, professor asked same Question to his students. He was shocked when all of them raised their hands. He asked one student the same question. He answered: Sir, you're 65, married to 28 year old; this is legal but not logical. Your wife, is having an affair with a 23 year old boy, this is logical but not legal. Your wife's boyfriend has failed his exam and yet you have given him an 'A'. It's neither logical nor legal! The professor collapsed!