There are situations where you want to manipulate your range (set of hands) in a given spot so that your actions make up a certain distribution.
For example, if you want your range to be made up of 30% bluffs, you can figure out how often you get to that spot with a bluff and how often you get to that spot with a strong hand. Since you're always continuing with the strong hand, you can then know what percentage of the time you need to continue to bluff in order to accomplish this. Since it doesn't matter which of those hands you choose to bluff with, it generally makes sense to use randomness to decide in the moment.