In SAP UI5, var that = this is a common technique used to maintain a reference to the correct context of this.
To maintain the reference to the correct context of this inside a function in SAP UI5, developers commonly create a local variable called that and assign this to it, like this:
var that = this;
Then, inside the function, they can use that instead of this to refer to the correct context. This technique is often used in event handlers and callbacks to ensure that this always refers to the correct object.