Why is the output of single-quoted strings sometimes numbers, sometimes just the string?

Here are instructions to always display charlists as lists in IEx: IEX - char printing - odd behavior