Building an AD-compatible service is not that easy, and it was not easy circa 2006, because there was a lot to reverse engineer. Sure, Sun had access to its own directory service (Sun DS), MIT Kerberos, BIND, OpenLDAP, NSS, and Samba, so it had a lot of the pieces, but there was a lot of work to be done putting everything together.
The issue was not reverse engineering Active Directory to make a compatible system, it was that they didn't really capitalize in that direction. Sun has all the necessary pieces to make a compelling option at the time.
Microsoft really only wiped competition in the area when 2000 landed with Active Directory instead of the clunky previous NT Domain system.
Yes. Over-generalizing a bit -perhaps-, the issue was that any Sun division that was a profit center tended to rest on its laurels instead of innovating and disrupting. Solaris was a cost center, so Solaris engineering innovated. The DS folks were a profit center.