Why did Alamosaurus have osteoderms and are we sure T-rex didn't have them?

What could possibely be the reason Alamosaurus needed such a "defense"? and why are we sure T-rex didnt have them? ik that there is no avidebce but still