Titanosaur armor
Some researchers doubt titanosaur osteoderms evolved for defense. They note that few pieces of armor tend to be found with titanosaur bones. Dodson noted this in regard to Malagasy specimens and so have others elsewhere. A paucity of scutes seems to imply the sauropods were lightly armored. Apparently there weren't enough osteoderms to confer protection.
The rarity of armor is, however, probably an artifact. One Ankylosaurus specimen provides a good analogy.
AMNH 5866 consists entirely of osteoderms—77 armor plates and smaller ossicles. No doubt fluvial action separated these osteoderms from the bones of the ankylosaur. Apparently, osteoderms were easily transported following decomposition of a dinosaur. It is noteworthy that AMNH 5866 has more armor than any Ankylosaurus known from cranial or skeletal material. Clearly, the apparent sparsity of armor can be misleading, and this applies to other armored taxa such as titanosaurs.
In addition to flood waters, other dinosaurs may have contributed to loss of armor. Some may have ingested them for use as gastroliths.
If titanosaurs had more complete armor than most specimens appear to suggest (and sauropod remains are often notoriously incomplete) a defensive function appears most likely.
Of course, other functions have been proposed. Titanosaur scutes may have stiffened the back, eliminating the need for hyposphene-hypantrum articulations, as in crocodilians. It is probable, though, that the armor evolved first, for defense or some other reason, yet by stiffening the back, it caused the vertebral articulations to become superfluous and disappear. It is hard to believe an extensive covering of dorsal scutes is the most cost-effective way of stiffening the back. Loss of hyposphene-hypantrum articulations may best be interpreted as a side effect, not a reason for the evolution of armor.
Similarly, while armor may have served as a source of extra calcium, in extremis, that is not likely to have been the reason it was originally selected for.
A defensive function is most parsimonius and also in accord with history. Titanosaurs outlasted other sauropods in the Aptian-Cenomanian interval. That was the heyday of giant predators like Tyrannotitan and Giganotosaurus. Besides huge size, carcharodontosaurs had teeth capable of ripping unprotected hide and flesh. No doubt, armor would've contributed to survival then, and subsequently. Later titanosaurs faced deadly tyrannosaurs and abelisaurs. Among the most fearsome were T. rex and Chenanisaurus barbaricus respectively. So while titanosaur armor may have had other uses it wouldn't be surprising if defense was the principal reason for its evolution.