The two buttons are so the elevator controller can coordinate the elevators and move people faster. Usually, it will pick up all the people going up, go to the top requested floor, and then make the trip down for the down passengers.
For example, say you have a five story building. You have passengers going up to floors 2 and 4 on the ground floor. You have passengers waiting to go down to the lobby on floors 5 and 2.
If the elevator starts at the ground floor, this is the sequence:
Ground to floor 2, let passengers off
Floor 2 to floor 4, let passengers off
Floor 4 to floor 5, pick up passenger
Floor 5 to floor 2, pick up passenger
Floor 2 to ground, let passengers off
Does that make sense? If you were waiting on floor 2 to go down and you got on when it was already going to floor 4, you’d just have to ride with it. You could press the button for the ground floor, but the elevator won’t go there until it’s completed its trip to the top floors. This page also explains it. When you have more than one elevator, the elevators are usually coordinated so you have one waiting on the top floor and one waiting on the bottom floor so the passengers dont’ have to wait very long.