How does WordPress make its functions globally available?

Themes and plugins are just files that are loaded alongside all the other WordPress files that contain its functions, and those are all loaded whenever WordPress is run. So there’s no special trick or anything weird going on. WordPress just loads the files that contain these functions before it loads themes and plugins.

Keep in mind that when WordPress is loaded, it doesn’t load your theme files directly. It loads index.php, which loads wp-blog-header.php which starts the process of loading everything else, ending with loading your theme. That’s why you don’t need to include anything into your theme/plugin.

Regarding your specific example, you just haven’t gone far enough. /wp-includes/functions.wp-styles.php is indeed loaded by wp-includes/script-loader.php, but that file is loaded by /wp-settings.php, which is loaded by /wp-config.php, which is loaded by /wp-load.php, which is loaded by /wp-blog-header.php, which is loaded by /index.php, which all requests are passed through via the .htaccess file.