I wanted to understand the legality of decompiling AEM bundles, specifically, Adobe developed bundles.
It would be helpful for me to look at the implementation for certain interfaces (beyond the documentation) for debugging purposes or to educate myself on best practices. So, how legal is it for me to decompile those bundles? and are there any restrictions and limitations to that legality?
Decompiling commercial software for any reason is usually prohibited by the terms of the license, whether or not you recompile. The general terms here apply, with product-specific terms in addition (UK specific, may vary for your country):
As I understand it, depending where you are in the world generally speaking it's unlikely to be illegal per-se, but doing so would put you in breach of contract and give Adobe a basis to sue if they wished to.
That said, in reality individuals do decompile commercial software, as part of self-education, troubleshooting, etc.. For a large company where this incurs no measurable loss, it would not be worth actively seeking out and pursuing such individuals. But, if you took that code and published it somewhere, or incorporated it into a product of your own, then they clearly have an incentive to protect themselves.