After 9 wonderful seasons, with all its ups and downs, I believe that the finale is very well written by Craig Thomas & Carter Bays. HIMYM reflects what life is all about. There is true love, hopes, dreams. However, in life there are also dissapointments, failures, loss.
Maybe Tracy (the Mother of Ted’s children) has to die young because she also wants to meet the love of her life before Ted. so in the end everybody is happy: Lily and Marshall happy as a married couple until they’re old, Robin got her dream job and life adventure, Ted has kids and having the chance to love both Tracy and Robin, Barney enjoys his legendary life and has the chance to feel true love to his daughter. Thank you HIMYM, I’m surely gonna miss you all!! 🙂