Depends on the level of government. For cities and states, taxes generate revenue, but for the federal government, taxes serve a different purpose because the US federal government is sovereign and controls it's currency.
This following is an excellent short video from the late David Graeber explaining why money is debt and what taxes do. While it's context is the UK, it applies to US or any sovereign government.
For California it's absolutely about revenue. But a dual purpose is to provide incentives/disincentives for certain behaviors. Even states that require taxes for revenue give tax breaks for incentivizing certain things to companies and other groups.
At the federal level taxes serve to mainly provide a demand for the currency, control the levels of money in the broader economy, and incentivize/disincentivize behavior. Unlike cities and states, the federal government must necessarily be in a perpetual state of deficit for the private sector to have a surplus.
To further back up Gaeber's claims, here is a reference from the Bank of England explaining how money is created.