It happens sometimes not always. But still it is recommended, before updating your phone keep a valid backup of your device photos or other data to avoid deletion.