The water filter removes particulates from the water. These can build up in the heat exchangers, causing them to work less effectively, & can clog the exchangers.
Water cleanliness is important to reduce erosion within your water system. Debris such as dirt or rust particles should be filter or flushed from the water system.