Dumb question for pilots, Why immediately land after take off for a landing gear failure?

Posted by nw342@reddit | aviation | View on Reddit | 56 comments

So, I've been watching a bunch of aviation videos, and ATC radio videos, and noticed something weird.

So, a plane takes off, the pilots notice an issue with the landing gears (wont go up all the way or whatever else), so they declare mayday and land at the airport that they just left.

But why is this? From my limited understanding, landing gears are used for landing, and not for flying midair. Whats the difference between immediately landing and going to the destination airport and landing there?