There's probably a lot of reasons.

The biggest thing is probably that data centers wouldn't want an M2, M2 Pro, M2 Max, or M2 Ultra. Apple would need a specialized chip. Right now, Apple Silicon tops out at 12 cores (8 performance and 4 efficiency). If I'm a data center, I'm going to likely prefer an AMD EPYC with 64 cores (and 128 threads) over an Apple M2 with 8 performance cores. I can slice that AMD EPYC into a lot more VMs.

Apple would realistically need to make a speciality part for the data center. That would mean taking people off its regular products and tasking them on opening up a new product line that Apple has historically been terrible at. Now Apple has fewer people working on iPhone, Mac, etc. and those products suffer in order to try and enter a market that probably isn't a good fit for them. Heck, data centers aren't going to want CPUs soldered to the motherboard.

Not only that, it would mean tasking software people toward the project. How much of your software staff are now trying to get Linux stable on M2 - taking staff away from iOS/macOS?

Apple doesn't want to do it because it would be a big undertaking. It's not just "print some M2s and sell them to Amazon."

Beyond that, it'd probably be a low margin market compared to what they usually go for. With iPhone and Mac, they have huge product differentiation giving them great margins, but they wouldn't for the datacenter. Even if they're the fastest and most efficient, data center customers are looking for performance-per-dollar. Performance per watt matters in the data center, but not nearly as much as it matters in laptops and phones.

The ARM ISA would mean that they'd need to sell at a discount compared to x64 chips (even if they have better performance) because x64 is the path of least resistance for customers. So Apple would need margins lower than Intel/AMD.

Plus, it would mean taking fab capacity away from iPhones and Macs. We've already seen how constrained that capacity can be. It took AMD 2 years to get to 5nm after Apple launched their 5nm processors. If Apple were to become a large data center player, they'd need to figure out how to prioritize that. For example, only the iPhone 14 Pro got the 4nm A16 processor last year - presumably because TSMC's capacity was really limited. All the rumors on 3nm seem to be similarly constrained. Apple isn't going to risk their cash-cow businesses (iPhone, Mac) for a low margin data center business so that would likely mean shipping data center CPUs that were older nodes. Heck, one of the reasons that AMD hasn't taken over the data center is that they've been a bit supply constrained - and Apple would be too.

There are lots of reasons, but it boils down to the fact that Apple would need to build something they don't currently make - a data center CPU, motherboard, case, open boot system so people can run other operating systems, drivers specs and docs for those other operating systems, etc. Apple would be facing a market where the ARM ISA is a negative, margins aren't as good, and customers would be skeptical of a company whose commitment to enterprise and data centers has been terrible. Plus, Apple's performance supremacy wouldn't even be a total positive in the data center since they're going to be looking at performance per dollar and there would be other companies who would accept low margins all competing in that space.

EDIT: I'd also note that Intel's total revenue is $63B and AMD's is $24B and Apple's is $388B. Let's say Apple is wildly successful and gets a server business as large as AMD's. Apple maybe increases its revenue by 3% (assuming that half of AMD's revenue comes from the data center). So when you say that Apple wants revenue, a new server business wouldn't get them that. More likely, Apple's data center business would be 10% the size of AMD and increase Apple's revenue by 0.3%.