Note that this may not actually be true, and you may need to pay to license even shorter excerpts of creative work. Copyright is a complex topic. It's not always safe to assume that you have the rights you think you have, in terms of reproducing others' work.
For example: "The proportion of a total work is not the only factor, though. If you are including the most crucial aspect of a work, even if it is only a small part, then the question of “substantiality” comes into play." [1]
[1] https://www.dukeupress.edu/getmedia/3363cb6e-04b6-43ec-b004-...
Whether or not it is infringement depends on if the use can be considered fair use. This is a more nuanced question and is not always clear.
In this case (Copilot) the real question is how transformative the AI training is. Given how verbatim some of the outputs are makes the argument less clear.
I'm assuming you're referring to fair use. In that case whether it's copyright infringement or not is very situational (the legal standard consists of a test with various subjective factors) and isn't as simple as "it's less than a paragraph so I can copy whatever I want".
It is…