This works because the Wii U gamepad has a built-in sensor bar, so you don't need the Wii sensor bar.
Note: you still need a Wii-mote to play Wii games on Wii U. You can't use the Wii U gamepad or its controllers. As a result it seems more convenient to play Wii games on a Wii.