It clearly indicates the type of resource to create. While some collections are homogeneous, and the examples in the specification appear to follow that pattern, that’s not required by JSON:API.
It’s also worth noting that nothing make the homogeneity of a collection directly discoverable via JSON:API. Therefore, it’s best for the client to always be explicit about expectations. In the case of a homogeneous collection, the type in the POSTed resource object allows the server to verify that the client’s expectation matches what the server is willing to provide: if the type doesn’t correlate with what’s allowed for the collection, an appropriate error can be returned.