Already at launch, and also during the next few years, until Intel fought back with Core 2 (but in servers the Core 2 descendants became better than Opterons only in 2009, with the Nehalem Xeons), Opteron was immensely better than the UltraSPARC CPUs used in the Sun servers. Only the Fujitsu SPARC CPUs were somewhat competitive, even if still significantly weaker. The Intel Pentium 4 Xeons were also worse, despite higher clock frequencies.
But as you say, the inertia in servers is huge, so Opteron gained market share very slowly, despite being by far the most performant server CPU that was available.
Where I worked at that time, we had big server farms with Sun or Fujitsu servers, which were disliked by design engineers like myself for their slowness. We had to make great efforts to convince the management to buy a few Opteron-based servers. Of course, after we got them they ran circles around the Sun or Fujitsu servers, a single dual-socket Opteron could be much faster than an 8-socket Sun server whose cost was many times greater.
At a previous job circa 2008-12, we were a sun shop and moved from spark to x86 Solaris. It screamed at sustained, high-concurrency loads and our workloads benefited from the trinity of Solaris' threading, ZFS tiered storage, and zones/containers. By the time the Intel Nehalem chips became available to use, our DB loads screamed, too. There were edge cases where the sparc chips were better, but not at the price points offered. Linux was competitive at a performance level (though we always saw some issues if the machines were pegged for sustained amounts of time), but production containerization in those days was VMWare, which was enough of a performance hit to not be worth it.