What you just described is exactly the order in which the iRule will get processed.
 
You can find more information on the return statement here:
 
https://clouddocs.f5.com/api/irules/return.html
 
The return statement will make the F5 stop processing further logic within the same event within the same iRule (there are certain caveats to this e.g. if you specify priorities on the event)
 
For the above iRule in question, there is only one event i.e. HTTP_REQUEST so if the first IF statement evaluates as true, the return statement will stop the subsequent IF statements from being executed.
 
With the return statement, it is important to note that if you were to for example add another event further down to this iRule e.g. HTTP_RESPONSE, then this will still get executed since it's a different event. In addition, if you were to add a second separate iRule to the virtual server with the HTTP_REQUEST event, this will also still get executed even if the return statement got hit in the first iRule.
 
If you wanted to disable ALL further iRule execution (all events and all iRules applied to the virtual server) then you can use the event disable all command