It seems you've figured it out yourself, but I'll provide a little more information on how NTFS access control lists (ACLs) work.
Local administrators have
SeTakeOwnershipPrivilege, which allows them to forcibly make themselves (or a group they're in) the owner of a securable object. Read more about privileges at TechNet. Normal users can take ownership if they're granted the right via the object's ACL, but admins can blow through ACLs with that privilege.
The only special thing about being an object's owner is that you can always read and write its ACL, even in the presence of a deny entry for those permissions! (This is where the "discretionary" part of "Discretionary Access Control List" comes from - the owner is responsible for who can do what.)
You had initially taken ownership of the files, which then enabled you to write to their ACLs, which then restored the appropriate access.
Note that programs running as administrator can enable
SeRestorePrivilege to read and write anything (respectively), no matter what the ACLs say or who the owner is.