For example: being openly gay in weimar germany was acceptable, and one had nothing to fear from the state knowing it though it was technically unlawful.
Fast forward a few years and it was a free train ticket.
If nazi germany happened again (or communism, or whatever floats your fuck-those-guys boat) the massive amounts of information people publish about themselves would go from quirky twitter bios to self-signed death warrants pretty fucking fast.
Should a person living in 2019-USA hide being gay from the government? Hell yes. Lie on every form you're permitted to, and avoid the others. Be cautious of lying where it's unlawful, that may be more dangerous in some contexts than being truthful.