Kubernetes Secrets are very flexible and can be consumed in many ways. Secret values can be passed to containers as environment variables or appear as regular files when mouting secret volumes.
Often users end up using the latter method just to wrap full configuration files into k8s secrets, just because one or more fields in the config file happen to be secrets (e.g. a database password, or a session cookie encryption key).
Ideally you should avoid configuring your software that way and instead splitting your configuration from your secrets somehow. Also make sure you know about 12 Factor.