Looking at wiktionary, apparently the two words have completely separate etymologies - but "pal" is borrowed from "brother" in one language, while "gal" is borrowed from "girl" in a different language (which itself derived it from English, I think?)
Language can be funky
Probably people eating crappy or stale pizza, a good fresh pizza has delicious crust, but let it sit and it turns tough, dry and chewy