TWRP makes it trivial to root the device. A developer named Chainfire created a method called "CF-Auto-Root" that is designed to be flashed directly in ODIN. Once TWRP is installed, you can root your device by using it to flash a small ZIP file containing SuperSU or Magisk. Root access allows you to:
The stock Samsung firmware is designed to overwrite any custom recovery with the stock recovery upon a normal system boot. To prevent this, you must boot directly into TWRP after flashing. gt-p5100-twrp-3.0.0-0.tar.md5
part ensures the file hasn't been corrupted during download. Target Device : This file is strictly for the TWRP makes it trivial to root the device