I have found at least one site that provides a "scientific explanation" as to how they work,
The water inside your toilet tank either consists of potable drinking potable or non-potable water. These waters contain the ions of ferric and non-ferrous iron oxides, as well as calcium and magnesium sulfates and carbonates (commonly referred to as "minerals in the water"). These are in solution and consist of positive ions of iron, magnesium and calcium, as well as negatively charged ions of carbonate, sulfate and oxides.The positively charged and negatively charged ions attract each other forming molecules that stick together.
However, given the lack of efficacy of magnet based water softeners, I'm skeptical that they can work on even as limited a circumstance. Is there any evidence to support the claim that they help prevent scaling or staining in any sort of noticeable way?