Why does wc <<<"$string" show a one-byte-longer length than printf "$string" | wc?

The difference is caused by a newline added to the here string. See the Bash manual:

The result is supplied as a single string, with a newline appended, to the command on its standard input (or file descriptor n if n is specified).

wc is counting in the same way, but its input is different.


It's a succeeding newline added by the here-string redirector:

$ s="hello"
$ hexdump -C <<<"$s"
00000000  68 65 6c 6c 6f 0a                                 |hello.|
00000006
$ printf "$s" | hexdump -C
00000000  68 65 6c 6c 6f                                    |hello|
00000005