There are several reasons. First, the beans may be too mature which makes them too starchy. The starch settles out of the food during canning. Second, minerals in hard water can give a cloudy appearance. Third, using table salt instead of canning salt. Table salt contains anti-caking agents that can cause cloudiness. With any of these three causes, it is a quality issue. Finally, it could be spoilage due to improper heat processing. Do not consume them in this case.