Hi Gagan gupta,
When programming the target MCU, the debugger interface will first mass erase the chip and then program the security to make sure the chip is on unsecured statue.
this process is automatic done by the script of debugger interface like J-link.
if there is a problem causing to disturb this process and cause the failure of programming of secure byte, then, the chip will be secured.
that is the general reason causing the secure of Kinetis chip!
hope it helps!