The actual answer is “it depends”.
Yes, by the comparison you gave, Artillery are superior. Even in the editions where TANKs cost 5 IPC (Revised/AA50/etc.), INF/ART pairs are still superior because of the fact that you can buy 2 INF/1 ART (3 HP, 6 punch on defense) for the same cost as 2 TANK (2 HP, 6 punch on defense).
However, you also need to consider the advantage that TANKs have over INF/ART in that they can move two spaces. This is incredibly important and should not be overlooked. For example, let’s say we’re playing on 42SE, I’m playing as Germany, it’s my turn, and I have Karelia (Factory) and West Russia occupied currently. Let’s say that Moscow’s defenses are light at the moment, but in 3 turns or so the US/UK will be able to land enough troops in Europe to give me a serious headache unless I pull the luftwaffe back to defend France/Berlin/wherever. Under these circumstances, I’d prefer to be able to take down Moscow before the US/UK become a serious threat 3 turns from now, so I’m going to build 2 TANKs for the Karelia factory so they can 2-move to Moscow (Karelia -> West Russia -> Moscow) on my next turn to participate in the hypothetical Moscow takedown. If I was acting purely on being cost-efficient, I would buy some combination of INF/ART instead, allowing me one or two extra INF to defend against UK/US with, but lessening the amount of punch I’m going to have against Moscow and slowing my push down to the point where I may not be able to finish off Moscow for several more turns, if at all.
Similarly, most Japane strategies on several maps devolve into “build 1-2 factories on the Asian Mainland, then build as many TANKs as you can and head for Moscow/India)” at some point or another. They’re choosing TANKs over INF/ART because the 2-movement points of the TANKs allow Japan to rack up IPCs incredibly quickly, which makes up for your inefficient use of IPCs by giving you more to work with in later rounds. Of course, as the game drags on, Japan will switch over to INF, but the initial rush is almost always with TANKs.
I know the above example is a bit contrived, but you can see examples of it in practice in a lot of Axis openings, especially in G40, where players often opt to open with Strat Bombers G1, in spite of them being extremely cost-inefficient units, simply because of the incredible benefit that their 6 movement points provide.
Personally, I prefer TANKs as a whole, but not to the point where I’d build only TANKs all the time. A Russia player with their back to the wall in Moscow should not be building TANKs, for example. Neither should a Germany player who has lost the offensive initiative (and is instead playing defense while Japan wins the game).