It's worth noting that unlike mechs often replacing tanks, tanks were originally conceived as a way to 'help' horseback cavalry achieve their goals by acting as a mobile wall and line-breaker who smashed machine guns and other nasty things that could easily kill a horse so the cavalry behind them could exploit the gap they made.
Hence you often see them working in concert with knights in fantasy settings.