Seems that retraction was pretty smart for that to have happened, or am I misreading it? (disclaimer, very occasional SLF here)
The gear generally
are raised smartly after lift-off, to 1) reduce drag and improve climb as soon as they are no longer needed, and 2) get the gear and doors stowed before the dynamic pressure of the airspeed gets too high. It puts more and more strain on things "hanging out," and the actuators that move them, as speed increases.
Without getting into the minutiae of specific aircraft, equipment, operator and pilot SOPs - the pilot not flying (therefore monitoring) has his eyes on the altimeter and vertical speed gauge and calls "Positive rate (of climb)" as soon as the needles indicate such, followed immediately by the call (and action) "Gear UP!"