When the ball hits the floor part of its energy is taken to deform the ball. Another small part is lost due to friction against the air. A perfectly elastic ball (with no deformation) in a vacuum would bounce as high as to where it came from.