Understanding the "pod spec" concept

The naming is confusing and will be changed in the near future.
The YAML is used to by the charm to inform the Juju controller what needs to be created in the cluster. It’s explained here

What the charm can ask for is workload “units” to be spun up, plus some other opinionated, curated k8s specific resources.