The 6.8 kg limit is due to UCI regulation 1.3.019, which you can find here, and thus applies to all races sanctioned by the UCI. It was originally instituted in 2000 in order to ensure that manufacturers didn't produce racing bikes that risked structural integrity, to promote rider safety. At the time, with the then-current technology, that was considered a low weight and was in response to riders and teams drilling out metal components and using custom CNC'd components. Even then, it was recognized as a stop-gap regulation to ensure safe standards rather than imposing a complicated strength test (as you can see elsewhere in that document for the strength tests that apply to wheels. Those regulations were in response to wheels that failed resulting in rider injuries).
For at least the last 10 years, unsuccessful attempts have been made to update the 6.8kg rule with a structural integrity rule. Current bicycle frames made from composites can easily drop below the 6.8kg limit, and some teams add weights to the frame to get above the minimum 6.8kg threshold. A side effect of this is that the use of power meters and other instruments have expanded in the pro peloton since they can sometimes be added without much penalty.