Does girls pant have a zip? What is the use of it?

Great imagination.... (you know what I mean :)

But on a serious note, it is indeed a good question to be asked.

zipper is an accessory which is used as a closure in apparels which serves as a mechanism to wear on & off garments (such as trousers, shirts, skirts, dresses, jackets, jeans etc.). If you imagine, you can easily figure it out that human body has many curves, some areas are wider (hips, shoulder, bust etc.) and some are narrower than others (waist, neck, knee etc.), so

when we try to wear on trouser, it require a closure (zipper, buttons or simple draw cord) as hip is wider than waist. And this is the reason women's trouser also needs zipper but in case of men's trouser it specifically serves two purposes , one is as mentioned earlier, to wear on & off and secondly the one for which this question was asked, i guess (to pee).

I hope, it answered your question.