Actually, the 23rd Amendment does NOT give 3 Electors to the District - it gives them to Congress, because the Electors are to be appointed “in such manner as Congress shall direct”.
it gives them to Congress, because the Electors are to be appointed in such manner as Congress shall direct.
I’m pretty sure that’s because Congress is, in theory, in control of the District. But Congress has (as it often does) turned that power over to someone else, in this case the locally elected government of the District. Don’t know if Congress has the power to do that, but who is going to challenge them?