Cassiopeia and other core extensions have the files you're asking about installed as part of the Joomla package, so the references in the manifest files are to point to where a file even though it's installed as part of the package (eg the manifest file would be used to identify information when you Discover extensions).
Breaking down the en-GB file for the language pack:
<files>
<filename plugin="languagecode">languagecode.php</filename>
<filename>index.html</filename>
<folder>language</folder>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.tpl_templatename.ini</language>
<language tag="en-GB">en-GB/en-GB.tpl_templatename.sys.ini</language>
</languages>
- In the files section, you define the language folder to use. If you have multiple languages you can simply include the folder reference in the files section, and any language files in the installer package will unpack to that location.
- In the languages section, the tag identifies the language to associate the files with, while the language folder tells Joomla which language subfolder to put the files into. So
/language/en-GB/
as language was defined in the files section.
For a template I use, there's three languages it ships with, so it's manifest language section looks like this:
<languages folder="language">
<!-- en-GB -->
<language tag="en-GB">en-GB/en-GB.tpl_templatename.ini</language>
<language tag="en-GB">en-GB/en-GB.tpl_templatename.sys.ini</language>
<!-- es-ES -->
<language tag="es-ES">es-ES/es-ES.tpl_templatename.ini</language>
<language tag="es-ES">es-ES/es-ES.tpl_templatename.sys.ini</language>
<!-- de-DE -->
<language tag="de-DE">de-DE/de-DE.tpl_templatename.ini</language>
<language tag="de-DE">de-DE/de-DE.tpl_templatename.sys.ini</language>
</languages>
A note on extensions
Since Joomla! 1.6 it is recommended that you place your extension's language files in your extension folder (This varies between extensions, particularly ones that have been around since Joomla 1.x). Joomla! searches for language files in a folder hierarchy: the extension language folder, the site language folder, then the language overrides folder. So if there's a file available further down the order, it will override the preceding language file.
By storing extension language files in the extension folder, you benefit by isolating and protecting your extension's language files. For example, an administrator removes a language from their Joomla! installation. Your extension's language files will not be removed. They will remain in place and will be available if the language is installed again.
See https://docs.joomla.org/Manifest_files for more information on Joomla's Manifest Files.