APSGN is caused by an immune response to a preceding infection with nephritogenic strains of Group A beta-hemolytic streptococcus (GABHS). The body's immune system forms antibodies to fight the streptococcal infection, but these antibodies mistakenly attack the glomeruli, leading to inflammation and impaired kidney function.