$5 may seem like a lot, but it's pocket change to them. $500 for every phone, probably $200 of that is profit. HTC isn't exactly hurting from this.
As for Microsoft and their patent trolling, I hope when they outgrow their current plethora of patents, Google (or anyone else) sues them for every penny they can get.