First of all, swimming is a very physical exercise, which can effectively burn calories and promote weight loss. If you insist on swimming every day and control your diet, it may be normal to lose weight.
However, if you lose your appetite after swimming, or if you are malnourished because of heavy work intensity, it may also lead to weight loss. If you lose weight too fast, it may not be a healthy condition, because it may cause your body to lose important muscle mass, not just fat.
Generally speaking, if you feel that this situation lasts for a long time, or you feel unwell, it is recommended to consult a doctor or dietitian to ensure your health.