Why not to include reference to /wp-admin/admin.php in Plugin

Could somebody explain why it’s advised never to load
wp-admin/admin.php in your plugin and how it could cause issues?

Because it is loading WordPress out of context– well, parts of WordPress. And that can cause unexpected effects such as functions not being loaded or functions being loaded twice (which will cause fatal errors). You will have trouble with hooks firing multiple times, or not firing. You may have trouble with constants. You may not have trouble, but that depends upon how and why the files are loaded.

…how this is different from calling say wp-load.php[?]

wp-load.php is a bootstrap file that admin.php will load about line thirty-something. It is a similar hack and can have similar problems. It should not be done either.

There is very little reason to use either technique. WordPress should be loaded for you plugin for most purposes and if not, say you need to make a separate request, use the AJAX API which will boot WordPress properly.

tech