If someone can only get the dollar if they guess which pocket it is in, then they only have a 25% chance to get it (with one guess). The fact that the dollar exists in one of the pockets means they can get it (non-zero chance), not that they are guaranteed to (100% chance). The term chance is not Boolean; it isn't a case of existing or not / true or false.

On the other hand, you have a 100% chance of taking it out of your pocket.

Chance to hit does not mean 'is it possible to hit?', it means the calculated chance of hitting something, based on stats, level, etc, and possibly modified by the target's chance to block or saving throws, etc.

No game that uses chance to hit has it only at 0% or 100%. That would be essentially useless information, better conveyed by a 'blocked' or 'out of range' message if it is impossible to target an opponent. If it is possible to hit something, it is much better to indicate the actual chance of that, rather than say there is some non-zero chance of a successful hit.

How useful would a weather forecast be if it said the chance of sunshine was 100% because it could be sunny, and the chance of rain was 100% because it could rain?