Why do I need to register my custom post type a second time when flushing rewrite rules?

When a plugin is activated, the only thing that runs on that activation request is the activation hook. whatever you’ve got hooked to init has not and will not run on that request, so you need to register it in your activation before you flush rewrites. it’s only after the plugin is activated, on the next request, that the init action fires for that plugin.