What? It doesn't give opinions. It doesn't have opinions, it's a probability matrix.
Put very simply, when it's "trained" it takes a lot of data as input, and out of that it builds a sort of "map" of relationships between the input data. When then given an input it can look up that input in the "map" and gives you the most probable following sequence.
Put simply, if you give it "Once upon..." it'll likely continue with "a time there was" because that's a pattern it'll have seen a lot.
It's an evolution of the autocorrect we have in phone keyboards. It's more advanced, and as people tweak weights of different neurons you can tweak the output. You can also train a model further to fit it to a specific purpose, but ultimately it's just fancy autocomplete.