Why the number 6 in P6SM in a METAR/TAF? A typical METAR or TAF reads something like this:

VRB04KT P6SM SCT025 BKN040 OVC060

P6SM means "greater than 6 statute miles visibility."  Why in particular is it 6 miles--why not P7SM or P10SM?  Particularly since sometimes METARs and TAFs list actual visibilities greater than 6 statute miles anyway:

28006KT 10SM CLR

Is 6 miles a limitation of commonly used equipment for measuring visibility, or something else?
The METAR format is defined by the World Meteorological Organization's (WMO)  on behalf of ICAO. According to the specification (section 15.6.3), visibility is to be reported in meters. The upper bound for visibility reporting is 9999, which indicates the visibility exceeds 10 kilometers. 

In North America, the METARs deviate from the standard format by using non-standard units. Visibility is reported in statue miles. Six statue miles is equivalent to 10 kilometers.

Hence > 6 statue miles is equal to the standard > 10 kilometers.