Amazon employees are encouraged to patent basically anything, at least in AWS. Validity of content or relevance to future business plans isn't really a factor.
It's probably a combination of defensive and opportunistic. Companies stake out positions and then watch how the winds blow.