The author postulates that Ted hates David because David got married while Ted remained alone.
The author claims that Ted hates David because David married while Ted remained single.
Ted doesn't hate Dave and he is very happy for him on his marriage.