However, the other ions are involved in other beer characteristics and need to be considered as well. Following is a very brief rundown of what happens in the mash with respect to the water ions. The mash contains a number of chemicals based on phosphorous, which are weak acidic buffers. But the mash enzymes work best at lower pH's around 5.2. So we often must aid the acidification of the mash.
Calcium reacts with the phosphates to form insoluble compounds which precipitate out of the mash.
In addition, hydrogen ions are released in this process. So calcium is crucial to proper mash acidification. Carbonates will react with calcium to form insoluble precipitates, so they can strip out the calcium we need to set the pH. Grain bills with lots of dark roasted grains are more acidic than pale mashes and can therefore tolerate greater carbonate levels. This is why brewing darker beers successfully is often easier than is brewing lighter beers. This requires that there is already some calcium in the water being boiled, however, and in any case not all the carbonates will be removed.