Parking brakes are used by commercial aircraft at the gate if the ground crew can not set the chocks. The most common time for this to happen is during a lightning storm when ground crews are not allowed on the ramp. Large airports like DFW have automatic parking lights that will guide the aircraft to the proper alignment and stopping point. The crew will then set the parking brake before deplaning the passengers. Some crews will also use the parking brake for ramp holds, de-icing, etc.
The reason why chocks are preferred over the parking brake, is due to the way parking brakes work on aircraft. On commercial aircraft, the pilots apply the brake manually, then turn on the parking brake, which closes a hydraulic valve trapping the pressurized fluid in the brakes. Due to internal leakage of the valve, the brake pressure will slowly bleed down over a few hours. Therefore, after a few hours the brakes will no longer hold the aircraft. Further, most aircraft ramps are slightly sloped away from the terminal, so the aircraft would end up rolling backwards. Due to the bleed down issues, most airlines require pilots to stay in the cockpit ready to apply brakes until the wheel are chocked.
I have personally seen cases of large aircraft being parked with a parking brake, that rolled after the brake bleed down. In one case, a 777 rolled backwards and the jet-bridge tore off its door. Link to News Article
Car parking brakes work differently. Parking brakes in cars have a direct mechanical linkage (typically a cable) that is held in place. Therefore, they do not have the bleed down issue and will maintain the same amount of braking force at all times.