its hard to say if thats caulk or silicone..some white silicones go like that. As gonch64 says , ideally it should be sealed within the rebate , ideally with a double sided glazing tape used too. My guess would be the silicone/caulk is masking either gaps between the frame and glass unit ( potentially frame isn't quite flat enough for the unit to sit flush everywhere , or slight damage to the wood work ). Using a sealant there is far from ideal