Because you confuse :while with :when:
(with-input-from-string (is "abc def 777 a b c")
(loop
:for c := (read-char is nil 'the-end)
:while (not (eq c 'the-end))
:when (digit-char-p c)
:collect c))
There is also no need to specify the end marker for read-char (the
default nil makes for simpler and more readable code).
Personally, I wouldn't even use with-input-from-string and read-char in
this case; a simple (loop for c across ...) would be better.