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