Secure code has the special privilege of calling Protected Functions. All Blizzard code is secure unless it has been tainted by non-secure code (usually through hooking). Frames that are created from Blizzard's secure frame templates are also created secure.
Secure Execution and Tainting explains this in great detail.