With A320s, I'm with ASR on this one for the most likely reason. Some are prone to overheating brakes. Most A320s use a brake fan after landing to cool them down. The older models of A320 dont have this kit. BA have both the old and new series.
So following TO if the warning goes off or the temp is seen as high, they leave the gear dangling to ensure adequate cooling before retracting it.
This can cause quite rigourous vibration in the cabin but is completely safe and if necessary, a lower height will be maintained until retraction of the gear takes place to allow safe ascent.