Navy SEALs choose Glock 19 instead of Glock 17. Why Glock 19 over Glock 17? The answer is not easy. I own both pistols and can tell you that the accuracy difference between the two of them is so small that it’s within the margin of error of even very proficient shooters like Special Forces.
As the distances that SEALs are going to need a pistol, the accuracy of a Glock 17 over a Glock 19 isn’t even a factor. At ‘bad breath’ distances the fact that a Glock 17 can shoot a 2.5-inch group and a Glock 19 can barely eke out a 2.25 isn’t going to matter in the least.

Glock 19 vs Glock 17
The Glock 17 and the Glock 19 are very nearly identical, with the Glock 17 having a barrel about 1/2 inch longer and a grip about 1/2 inch longer than the Glock 19. The longer grip of the 17 allows for a slightly longer magazine, which holds an additional 2 rounds bringing its mag capacity to 17 vs. 15 for the Glock 19.
When locked into a vise, the Glock 17 may have an incrementally smaller accuracy advantage at 25 m, but the difference is so small between the two that even a trained marksman is going to have a real challenge noticing a difference, even if allowed to take slow, carefully aimed shots on a comfortable target range. The shot grouping is a probability cone that extends outwards from the barrel of the gun to the target. The closer you are, the smaller the cone and the smaller the differences will be between the two weapons.

Under combat conditions, 25 m is beyond the normal engagement distances for most pistol use, and you aren’t going to have time to take carefully aimed shots anyway, so the accuracy difference between the two disappears.
Why SEALs have chosen Glock as their service pistol?
To your question, I can only assume that the SEALs decided that since there was really no accuracy or reliability difference, the extra length, weight, and bulk of a Glock 17 was not worth the extra two rounds of mag capacity.
Interestingly, Glock recently submitted a hybrid of the two guns for military consideration, the Glock 19X, which has the long grip and extra mag capacity of the Glock 17 but the shorter slide and barrel of the Glock 19. It was not selected for use but proved to be such a popular option Glock started selling it to civilians.

Glocks are the only handgun designed and tested to function in, around, and even UNDER water and there is even a firing pin bushing specifically made to allow water to pass around it for 100% reliability when submerged(probably very important to Naval Commandos).
Glock modifications
There is also a popular modification that gun owners do themselves, (which is loosely referred to at the 17x), where people cut down the grip of a full size 17 by 1/2 inch so that it will fit the shorter mag of the 19. This is a popular mod for people who like to conceal carry, and I am told it is particularly popular in Canada, where they are limited to 10 round magazines and compact pistols for carrying are difficult to obtain. Maybe someone from Canada can chip in on that and explain further.
Personally, I carry a Glock 26 ( another 1/2 inch shorter in the barrel and 1/2 inch shorter in grip length than a 19) that only comes with 10 round magazines. However, I use the larger magazine of the 19 in mine (making it a 26X of sorts) with the use of a flush-mount magazine adapter allowing for me to have 15+1 rounds and a full grip.
All these articles keep saying the SEAL’s chose the 19 because it shoots underwater. This is totally false. When fitted with “Maritime Cups” (referred to as “Bushings” in this article) the gun will not hydro-lock. The cups allow the striker fired weapon to push out water from the striker tube, allowing the firing pin to strike the primer with enough force to fire the weapon. There are no gunfights underwater. It allows a SEAL to come up out of the water with a handgun that will fire immediately, or use the gun that has been underwater to pull it out of the water and immediately fire.