It is because when the ball rebounce, some energy of it will lose due to air friction
it is moving throgh the air and aor excerts a frictional force oposit to the motion of ball,
so it loses some energy in every motion whether it is up or down
thats why it stops after some time