what to do if there is a drush command file worked with drush 7 but doesn't work with drush 8. The official docs seem not to have an upgrade guide for this.
Drush makes an attempt to never run any code associated with a module or theme unless that module or theme is enabled. This protection is often more conservative than necessary, as some Drush extensions do not exercise any code that requires a Drupal bootstrap.
None the less, Drush 8 is more rigorous than Drush 7 was. Drush 7 would search for extensions in all of the theme folders regardless of whether the corresponding themes were enabled. Drush 8, on the other hand, ignores extensions stored with disabled themes.
Include paths provided specifically via the --include option are always searched, though; Drush makes no attempt to determine if the specified path happens to correspond to a disabled theme. This is why the workaround you found works.