It was a decision by the artist, Dave Gibbons.
He has said so in his Twitter, in response to a thread discussing the origin of the 9-panel grid:
Actually, I chose the nine panel grid and sold it to Alan. Gave him great control & its restriction challenged me to compose more creatively
Dave Gibbons on Twitter
In Watching the Watchmen, Gibbons mentions the 9-panel grid again, and notes that it was influenced by Steve Ditko, the comic artist who created the character Rorschach was based on, as Comicsalliance reports. Dave Gibbons also mentions Ditko in another tweet from the above thread.
The control part is understandable - 9 panels means a lot of scenes one can be fit on just one page. It makes the progression of the plot easy, by describing more than one action without the need for the reader to flip the page (or use two pages - see below).
It also makes following the plot easier - one simply has to read from left to right, top to bottom. Some even suggest that a grid is similar to the poetic meter. This is sometimes overlooked in modern comics, where panels overlap and details stick out:

Death Vigil, volume I, chapter (issue) 1, page 28.
Am I supposed to be reading from left to right first, or top to bottom? Such layouts as this may be confusing for readers like me, who cannot be sure which way the page is supposed to be read, so they read it the wrong way, and sometimes get spoilers. With a strict grid, on the other hand, it's impossible to follow a reading order other than the one intended by the creators.
This grid is great from the artistic perspective on multiple levels. For instance, there are a lot (and I mean a lot) of ways of using a 9-panel grid:

Image courtesy of Tom Carpenter
I asked a question on Mathematics Stack Exchange: In how many different ways can a 9-panel comic grid be used? Turns out 9 panels allow for 322 variations, which is more that a 6-panel grid and a 4-panel grid allow - 32, and 8 variations, respectively (for comparison, 6-by-3 grid, i.e. 2 pages, allows 314662 variations, while 16-panel grid allows 70878). This gives the writer and the artist sufficiently many ways to divide the page in any shape that is most suitable for the story:

Watchmen #4 and #7; here and afterwards, click on the image for full resolution.
As this website points out, this grid has the benefit of a central panel - one that could be the focus of the page, and that would be the summary or the main idea of the whole page.
On the other hand, 9 panels could also be divided in the following way:

Watchmen #5
Notice that the colours of the panels alternate:

Or in case of the second page, it's the colour purple and the triangle symbol that form the pattern. I found this contrast an interesting detail and similar to techniques in films and books, i.e. when the camera shoots alternate between a close-up of the actor, and wide shots of the scenery, or when a chapter told from a character's perspective, and then from narrator's or other characters (e.g. The Martian and The Witcher).
Finally, the 9-panel grid allowed the creators to explore the potential of 2-page "splash" scenes, such as this one:

Appendix 1:
I don't know how much exactly the 9-panel grid influenced Alan Moore's script, but there's a panel with With Alan Moore and Dave Gibbons, moderated by none other than the ubiquitous Neil Gaiman, which offers at least some information on their creative process.
Appendix 2:
It looks like the latest crossover between the mainstream DC Rebirth universe and Watchmen also used a 9-panel grid, to indicate the connection between the two comics:
Image source, click to enlarge