Flashing TWRP to MTK device with SP Flash tool not working
When you boot directly into TWRP after flashing TWRP patches the stock system recovery-from-boot.p file by renaming (modifying) it: 

rename"/system/recovery-from-boot.p", "/system/recovery-from-boot.bak"h

This prevents the system from replacing twrp with stock recovery.

Simplifying the process there are a couple of files involved. First, the install-recovery.sh is called by the init.rc at boot. If there is an update to recovery or an issue then the install-recovery.sh calls for the recovery-from-boot.p (the patch) to patch the recovery and boot.img.