The quote from that book is:
Patrick was uncomfortable using Shakespeare in the ship battle with Data.
“I don’t think the Lear quotes work,” he’d said in his notes. “It will be
meaningless to most of our audience and I’m not sure I believe in what it is meant
The idea harkened back to the television series when Picard had taught
Data about humanity by directing him in fully-recreated scenes from
Shakespeare’s plays on the holodeck. We’d actually built one memorable
episode around the themes of Henry V. In addition, I thought the
King’s madness in Lear would provide a metaphor for Data’s erratic
Losing Shakespeare didn’t really bother me. But I felt we needed
something like it. I argued that Picard would try every trick to
safely capture Data before ever firing a weapon that might harm him.
Patrick suggested, “Well, couldn’t I tell him some jokes that we
both know or perhaps sing something from Gilbert and Sullivan?” And
a new sequence was born
However, this conflicts with his past statements that he's just not keen on their works
In the new Star Trek flick, Stewart's Picard has a lengthy scene with
Worf and Data in which they sing "A British Tar" from Gilbert &
Sullivan's HMS Pinafore. Again, to some surprise, it's not Stewart's
cup of tea.
"I'm sorry, but i really don't like Gilbert & Sullivan," he says,
shaking his head between his hands. "It's like the Marx Brothers. I've
tried but I just don't get it."
Patrick Stewart tells the story very differently. Apparently he wasn't keen but all of his other suggestions were dismissed
This is how it goes with putting movies together. Michael came up with
this idea of "OK how do we distract Data? take him off guard with
something that might just distract him for a moment". What he wrote
was Shakespeare, rehearsing him in a scene from King Lear. Oh God it
was deadly. It was nice, I mean King Lear's a great play but it's not
the moment you wanted to have there. I don't recall whose idea it was
but "maybe it's musical" came up. First of all, I said, anything that
Tony Bennett sings is what we should do, because Brent has this
beautiful tenor voice. They said it's obvious and corny and Rick is
always reluctant to make 20th century references so overtly. And then
Michael came up with the G&S. Now, just like the Marx Brothers, I
don't get G&S. Never have. But I thought wait a minute I know what
they should sing! Picture Picard and Data singing Three Little Maids . And they said "no that's vulgar, Patrick." And they came up
with this song which I resisted and fought and said no it's boring but
I was wrong. It's totally successful. So that's how the G&S came
about. It works nicely. You're right, the counterpoint of the G&S and
what they're actually doing is charming.