It just shows where the level is. Nothing will happen if it is removed. But in other variant you can actually use such line to mark the level => you will compare the current price with it's level, not with a variable. But variables are faster, that's why I decided to use a variable.
Performance. While you don't have a trade. the pink block will not be executed in variant 2. It can be optimized even more (with more variables), because you don't need to recalculate this value on every tick, but it should work fine line this.