Muzan likely believed it possible that one day, Doma could become strong enough to survive sunlight, so killing him might've been detrimental to the reason Muzan made him a demon in the first place.