The National Fire Protection Association (NFPA) has a standard NFPA 24 Installation of Private Fire Service Mains and Their Appurtenances that discusses to some extent piping and joining requirements. While it would be advisable for you to refer to this extensive standard yourself, I understand allowable buried main piping materials, that have traditionally included widely used cement mortar lined ductile iron piping, now also allow coated and somehow lined steel pipe for even buried service, as well as some plastics and others, but steel piping et al is required to be and "listed for fire protection service". Steel flange standard AWWA C207 is referred to in the standard and/or appendices, as is AWWA manual M11 for steel water piping. I do not think flanged joints are excluded, except perhaps at those locations where piping passes under foundations etc.; however, I know referenced AWWA manual M11 does have some comments under a section "Good Practice" that states, "Flanges are commonly used to join steel pipe to valves, meters, and other flanged accessories", followed immediately by the statement, "Thermal stresses may be a consideration, and these can be accommodated by sleeve couplings, grooved-and-shouldered couplings, special welded joints, or expansion joints..." as well as similar potential needs for flexibility near welded flange outlets or nozzles.
I guess I would only add that flanged piping on paper is basically just straight and really allows for conforming to unanticipated changes in (mis)alignment, cover, non-uniform support/settlement, or beam loads etc. by stressing the pipe and gasketed joint. I noticed a few years ago BigInch on the Pipelines.... forum wrote,
“All flanges are a necessary evil. Sometimes the evil is above ground, sometimes below. Wishing away the evil usually doesn't work.” BigInch 2011