Sure, it indexes the text, but that has no bearing on SEO.
Most people using hidden text use it as a keyword stuffing tool, stuffing more relevant keywords into the page in order to get higher page rankings.
A lot of SEO techniques and how Google views them comes down to intent. It's pretty clear using hidden text and other gray and black hat methods will be picked up by Google and penalized because its clear the intent is to try and gain an advantage in the SERPS. This has been true going on ten years or more:
source: https://moz.com/google-algorithm-change#2000
Cassandra — April 2003 Google cracked down on some basic link-quality issues, such as massive linking from co-owned domains. Cassandra also came down hard on hidden text and hidden links.