recursive gateway

In this example for Advanced Routing Failover without Scripting, there is the example

/ip route
add distance=1 gateway=Host1 routing-mark=ISP1 check-gateway=ping

We want the gateway to actually be GW1, which I assume happens.. why does this happen?

The page you link to contains a link to the explanation. When the IP address of the gateway specified for a route is not in any of the connected subnets, a route to that IP address is searched for, and this process repeats until a route is found whose gateway IP is in a connected subnet. That one is then used as an actual gateway for the route from which the recursive search has started. However, this “topmost” route is only active while the gateway IP of that route responds to pings.

awesome thankyou!