The pH in SDS PAGE is determined by the buffer components, their concentration is designed to allow the stacking of proteins in the top (stacking) gel by isotachophoresis as described originally in doi:10.1111/j.1749-6632.1964.tb14207.x. As a result, you get sharp bands (much thinner than the loading zone in the well) and hence high resolution.
There are other gel systems, designed for the same purpose, available for work at different pH (see doi:10.1021/bi00729a014, doi:10.1021/bi00729a015, doi:10.1021/bi00729a016 and doi:10.1111/j.1749-6632.1973.tb47551.x).
Hi Khanyile Sibanda . The short answer is that charged particles (ions and proteins) move in the electric field. Adding HCL to the SDS buffer system increases the salt concentration.
Ions move faster and more easily through the gel compared to the proteins so the more ions you have in your sample the more they move and not your protein.