Because a partition has a predefined size. In a container, all volumes share the full space available. See this article: https://www.howtogeek.com/327328/apfs-explained-what-you-need-to-know-apples-new-file-system/

It mentions High Sierra, but the principle is the same.

variablepulserate.10centuries.org.