Normally when an aircraft departs, the landing gear is retracted shortly after the aircraft is airborne. While watching aircraft departing from an airport in my city, I noticed, that occasionally the pilots leave landing gear down for many miles (10NM or possibly more). What is the reason for this, are they trying to cool down something?
It's usually for one of two reasons:
Brake temps are displayed in the cockpit and if the temps were elevated from a lot of, or excessive, brake use during taxiing, the capt may delay retraction until the indications come down, mainly to avoid gear bay overheat indications. This will be more common on airplanes that have more idle thrust than necessary to roll at normal taxi speed, which can cause a tendency to ride the brakes. CRJ200s, which can get going pretty fast on idle thrust with both engines running, are really bad for this.
Also in winter on a departure from a slushy runway, retraction may be delayed to try to blow off as much slush as possible since once the slush freezes, it can immobilize the wheels, preventing normal spinup on the next landing (if it's still cold at destination).
It could be that the Wheel Well Fire Detection System was inoperative.
According to the B-787 "Master Minimum Equipment List" (as shown from this website, in pertinent part) the Wheel Well Fire Detection System:
"May be inoperative provided landing gear remain extended for ten minutes after takeoff."
Cooling the gear after takeoff is one likely scenario, if the aircraft had only a short time on ground between landing and takeoff. Another scenario (from memory - standing by to be corrected) is an inoperative wheel brake on one of the main gear wheels, where sufficient time must be allowed after takeoff to ensure the wheel is spun down before retraction.