A beating heart cadaver is kept alive in order to keep its organs from decaying before they can be transplanted.
How long the brain-dead person is kept on the ventilator may vary depending on the availability of surgical teams and the wishes of the family of that brain-dead person.