Why do I need to be in the root of a package to `compute-checksum` of a binary?

When computing the checksum of a binary framework, the documentation states that I need to execute the respective command in the root of the package.

Yet I noticed it doesn't make any difference what the content of your Package.swift file is. As long as swift package compute-checksum path/to/xcframework.zip finds any Package.swift it is happy and gives you the checksum. I tried with different (unrelated) Package.swift files and even an empty one. Same result of the checksum. If there is no Package.swift file the command fails.

So my assumption is that any swift package ... command has a precondition check for an existing Package.swift file.

Would it make sense to remove that precondition check in that case or am I missing anything else?