I mean no offense but your logic is inherently flawed. Both vehicles were made and are used for entirely different roles, their roles do not and will not ever overlap greatly and so to say one can replace the other or is more useful than the other is a very big assumption given how much their usefulness can vary from force to force. This video explains it better than I could in words.
No IFV In existence has the same firepower and armor in a single combination as a modern MBT, an IFV cannot spearhead an armored offensive assault, which is the main role of tanks these days.