This sense of shanzhai originated as a Cantonese slang term for fakes and counterfeits, and has since been turned around as a positive term for something with an anti-establishment, anti-elite, grassroots sentiment.
山寨原是廣東方言，意指盜版、仿製，引申有「以草根對抗權威，以大眾對抗菁英」的意味。