When you create subnets, Azure creates system routes that enable all resources in a subnet to communicate with each other. You can override the system routes by creating UDRs. This way, you can force traffic to follow a particular route.
For instance, you have a network that consists of two subnets and you want to add a VM that is used as a DMZ and has a firewall installed on it. You want traffic only to go through the firewall and not between the two subnets.
To create UDRs and enable IP forwarding, you have to create a routing table in Azure. When this table is created and there are custom routes in there, Azure prefers the custom routes over the default system routes.