It sounds to me like the current tenant gave notice that they would move out then rescinded the notice, which is at the landlord’s discretion to accept or reject. It would be helpful to know what city the building is in and what terms were specified for your holding deposit.
I’m having trouble finding California law governing holding deposits, but from what I’ve read landlords can recover a “reasonable” amount to cover costs when a potential tenant backs out. However in your case the landlord has decided effectively to rent to someone else, and probably should refund the entire deposit if you don’t want the less desirable unit. If they don’t refund the deposit you would need to sue them in small claims court.
I might be inclined to ask management what law they are referring to. Perhaps others with more specific knowledge can comment as well.

