However, note that the time it takes to reach the bottom is not the same for the two balls. The curved path has a longer path length.
So why is the ball traveling the longer way there first?
Because it converts more of its potential energy sooner and thus has the higher velocity earlier. Since it moves faster earlier, it arrives at the bottom first.