To answer your question about where governments get the authority to require licenses, the answer is that it's inherent in their status as governments. In the United States, the federal government is one of enumerated powers. When Congress passes a law, and that law is challenged, the government has to be able to point to a specific section of the Constitution that the law is implementing.
This limitation is specific to the US federal government, and is a result of the federal-state distribution of powers. It is not a general requirement that all governments have to abide by. Generically, governments have full authority to pass laws on any subject in order to promote the general welfare unless there's some reason they can't pass it. This is called "general police power," and in the US it is possessed by the states. There are some limits to what state governments can do, to be sure. They can't interfere with federal law in areas regulated by the federal government. They can't pass a law that names an individual and punishes them. They can't infringe on fundamental rights protected by the federal constitution. Their state constitution imposes its own limits on what they can't do. But that's how it's expressed -- in terms of what they can't do. The idea that they can do anything to promote the public welfare unless there's some reason to say otherwise is implicit.
In this case, unless there is an actual reason states can't require paying a regular fee to drive on public roads, they are allowed to do it. States have the inherent power to raise revenue. An excise tax on operating an automobile on tax-funded streets (which is what a license fee amounts to, with an unexpired license serving as proof of payment) is a perfectly legitimate way of raising revenue, just like imposing a toll to use a particular street is a perfectly legitimate way of raising revenue.
You're claiming it's arbitrary because the specific amount of the fee and how long it lasts for are arbitrary, but almost everything government does is arbitrary in that sense. Maryland requires 20/40 vision for an unrestricted license. Is someone with 20/41 vision significantly less able to drive than someone with 20/40? Nope. However, there's certainly a good reason to say "you must have decent vision to drive." Letting examiners make their own judgment calls on whether vision means whether you pass can depend on how your examiner is feeling that day. This is the kind of arbitrariness that a government is supposed to minimize: an individual has no idea whether an examiner will say their vision is good enough or not, and there's no standard to ensure people are treated equally. By setting the line at 20/40, there is a single rule applicable to every state resident. You might be denying someone a license because their vision is only slightly worse than the arbitrary standard, but that's better than leaving this totally up to an individual examiner.