You've discovered
flocculation.
The simple explanation? Calcium is a +2 ion, so it has two arms reaching out, able to grab some negative charge. It can pull things together like a parent reining in toddler twins headed in different directions. Sodium can't do this. It is only a +1 ion, so if it grabs onto something, it just goes along for the ride wherever the negative charge was headed.