Is there a linguistic reason why we sometimes use a singular pronoun and verb even when it refers to a plural subject? [duplicate]

In a comment John Lawler wrote:

The plural in ones comes from the fact that herd is a group noun, and consists of individuals together.

Also in a comment BillJ wrote:

The pronoun “it” is not referential here, but a meaningless dummy element functioning as subject in an it-cleft construction, where the foregrounded element is complement of "is". The pronoun is really just a 'placeholder' for the variable that is defined in the relative clause; it does not have the number properties of the NP headed by plural "ones”.