That's not the definition that I learned: a white elephant is an unnecessary luxury with limited utility that you can't obtain and maintain unless you're pretty far from being in need. That's what I meant here.
The alleged origin is a king who gave them as gifts, knowing they had no practical use and hoping the cost of feeding and caring for them would bankrupt the recipients.
From Thailand. Elephants are sacred there, especially white elephants. So if someone gave you a white elephant you could not refuse or get rid of it without causing offense.