Main is a 10 year vet with 39 fights. He's 3-2 in his last 5 fights with a ton of wear and tear. He's been averaging 4 pro fights a year so it's not like he's struggling to get fights. He likely just realized that his body isn't going to last forever and that he's not going to become a contender any time soon.
And Perez couldn't give a crap about Reebok. He owns 2 of his own businesses and his family owns a business. He said he's now planning to travel the world. It's pretty clear he doesn't need a dime from Reebok or care about the money. Guys like him do MMA for fun, not for the paycheck. Your typical UFC jobber doesn't talk about globe trotting as option B.
Neither of these guys were "middle tier" fighters, they're bottom of the roster jobbers that nobody would give a crap about if they didn't use the word "retire" instead of simply waiting to be cut.