Navy PST requires only specific kinds of strokes during the test which includes the elementary sidestroke, the breaststroke, and a modified sidestroke called combat swimmer stroke (CSS). The reason why freestyle stroke is not the first choice is that the mentioned underwater recovery strokes are more efficient and low-profile when done properly. Though, the Navy does allow swimming in freestyle in certain situations like for Air Rescue Swimmers when competing for their future job billets
Source: https://www.military.com/military-fitness/ask-stew-choice-of-stroke-navy-swim-test