Structuring Loose Data
When data is defined in an external data source, that system (almost) always requires that the data has some schema attached to it. That means that the structure of the data is predictable. So when your content source is external, Contentlayer already knows what that structure should be, and it responds accordingly.
But when you're working with local files, there is no inherent structure to bind these files to your code. Thus, if you change the content with a file, you could quite easily break your site's code.
When using local files as your data source, Contentlayer provides the ability to define the schema of those files. That way you can be confident in the shape of the data, and can write more solid code reflecting that shape.

