I've seen this recently, and I think it is since I migrated from
Office Live to Office 365, which uses a proper version of Exchange for
email on my phone. It seems to have strong policies and remote admin
of my phone, with the ability to remote wipe, etc, so I suspect it is
applying an 'enable keyguard/lock' policy and overriding MY settings.
Not sure how to go about correcting it at this stage, but I can't see
that Tasker or Secure Settings are at fault here.