The sample scenes use the .meta files of the other assets, particularly prefabs, scripts and scriptableobjects. Other scripts and ScriptableObjects use the meta files of all other kinds of assets it needs.
I'm not sure what .meta files of the scenes themselves are for.
In any case, this is how you would serialize your Unity project on a git repo. You include the .meta files or else connections between assets break.
Not sure what happens if the guid matches, but it looks like it's a 512-bit id. I'm also not sure what the chances are there.