Unlike the toilet bowl, the tank should never come in contact with dirty water. However, it can still get a little grody in there over time—possibly from a metal (flapper) chain that’s rusted, hard water stains on the ceramic, mineral buildup, or even smelly bacterial deposits.
If someone once put a brick in the tank to save water, you may also be dealing with crumbled sediments gathered at the bottom of the tank, and possibly even dropping into the toilet bowl when you flush.
(Pro tip—if you want to save water for each flush, use a filled and sealed plastic jug or a buy a "tank bag" instead of a brick.)
If your toilet tank is due for a semi-annual cleaning, here’s how to do it: