From BIP-173:
The lowercase form is used when determining a character's value for checksum purposes. Encoders MUST always output an all lowercase Bech32 string. If an uppercase version of the encoding result is desired, (e.g.- for presentation purposes, or QR code use), then an uppercasing procedure can be performed external to the encoding process.
Currently if HRP contains uppercase characters, the checksum will be generated over these uppercase characters resulting in mixed-case output that will always be invalid even if the case is changed manually after encoding. This shouldn't happen because both prefix's bc and tb are lowercase currently, but we assert this condition anyway.
This is consistent also with the C reference implementation