I think Samsung had once intended to ditch android and put tizen on all their phones. At the time of the S4 they were Selling in huge numbers and were a serious contender to Apple. However sales have slowed down and they’ve never been able to get back anywhere close to the sales they had with the S4. Also I think at some point in 2014 Samsung had a meeting with google and concessions were made on both sides, including Samsung having to have stock google apps on the phone out of the box. I think google agreed to extend some of their patents to protect Samsung in the their legal battle with Apple.
I remember the tab pros that were initially unveiled at CES in 2014 were heavily skinned and the final product that was released was toned down as a result of the agreement Samsung came to with google. Also there was one Samsung launch which occurred before that meeting and it was noted that nowhere had Samsung mentioned android in the keynote. As a result of the meeting I remember subsequent Samsung phones then started displaying powered by android when they booted up.