When RB6 is high, you get 5 * (1000/1680) = 2.97 volts. When RB7 is high, you get (1000/1010) * 5 volts = 4.95 volts. Without the 1k resistor to ground, you'd always see 5 volts, though the current going into the LED would be different. Thus that resistor isn't strictly needed in this particular application, since you're going to get a voltage drop across the load anyway.