It appears that your car's cooling system may have an air lock somewhere. Once warm, the sensor will become hot enough to turn the fan ON, which will cool the water in the radiator. As this cooler water passes through the pipes it reaches the sensor, which becomes cooler, and it turns the fan OFF. This process repeats itself, but how quickly it does so depends on the engine speed, the pressure of the coolant and the overall efficiency of the cooling system. An air lock would prevent the cooler water reaching the sensor, but that might not be the cause of your fan continuing to run for a long time.