It is not very obvious if someone includes a layer that is invalid or nonexistent. This is a particular problem when getting started (e.g. misunderstanding the format of layers.yml), but it could also happen due to a typo.
However, it may not be correct to error if a layer cannot be found, as it should be possible (at least in the case of multiple package contracts) to leave out certain layers for certain packages.