My bill is with the restaurant, not the government, so why does the restaurant include the total + the tax when they calculate the suggested tip? Since tax is different in every state (or even different counties) and some states don’t have a sales tax, this means tips are supposed to be higher or lower in every state. This is stupid, so why do restaurants do it?

You do NOT include tax in the tip. Deduct the tax and tip on the total food bill whatever is appropriate.