What is the “pub” theme? [closed]

There is no pub theme, that’s a quirk of how WordPress.com the premium 3rd party service ran by Automattic is internally structured. It’s non-standard.

To be more specific WP.com doesn’t use the normal theme folder structure, and instead of searching wp-content/themes for theme folders, it searches wp-content/themes/pub and several others for themes, but mostly pub.

This is done purely to keep all the public themes together and was done a very long time ago as a result of technical decisions made early on. Specifically, the pub folder is an SVN checkout of a shared theme folder repo containing lots of themes. To avoid putting internal things in a publicly visible SVN repository, somebody came up with the subfolder system. Now they’re stuck with it for historical reasons.

I would not recommend doing this on your own site, or using the structure of WP.com as an example of best practices. WP.com is an enormous multisite install ( multi-network too ), with a lot of obscure historical changes, and user/site counts in the hundreds of millions and more. Normal rules don’t apply here, nor do normal hosting structures ( for example wp.com is hosted across multiple data centres ).

If you want more details on that, you’ll need to speak with someone who works at Automattic.