So basically the gas is specified as how much gas the sender willing to pay to send the money to the "msg.sender"
This claim is not correct.
To understand what's going on, you need to have a basic understanding of how a low-level call is executed (the yellow paper or this paper) are good starting points.
Essentially, when a call is performed (implicitly, but there are exceptions such as delegate call) the sender is the smart contract that is executing.
It gives as input a copy of portion of its memory and along the message it sends an amount of money. Moreover the sender has the faculty to specify the amount of gas that the callee has at its disposal for a possible execution.
Finally, after the invocation, depending on the exit status, a flag is put on top of the stack.
ANSWER
In your case, the executing contract is simply sending var1
Wei to the msg.sender
. The msg.sender
has at its disposal 0 gas units and so, it is prevented to performing operations.
This means that even if the recipient contains a fallback function no executions are allowed.
REPRODUCE CODE WITH 0 gas
A simple example that use the (not recommended low-level) call instruction:
int var1 = 12;
msg.sender.call.gas(0).value(var1)();
You can find more details about send and transfer function (that give a limited number of gas that is safe against re-entrancy but still allow code execution) in the answer to this question.