There are several use cases (e.g. T168877) where the data comes as encoded and needs to be matched against un-encoded data, or vice versa, and while encode_for_uri() function allows encoding, there's no function for decoding.
We may also want to add mediawiki encoding (replacing ' ' with '_' and other things, as in T131960).