Sort order depends on your locale, so there's probably some odd interpretation going on there. I get the same results as you on my system. Here, a comma is _ignored_ by the locale. Hence, if we add `276` and `296` to your list:
$ sort /tmp/tosort
140,22
236,224
276
2,86
296
This also explains the results from your second command. The comma isn't being sorted _first_ , but being ignored. Hence, it's essentially sorting a empty string. If you add a literal empty string to your test, you'll also see it at the beginning.
$ echo -e "2\
,\
3\
" | sort
,
2
3
(It's unclear to me why the empty string precedes the comma. I suspect that the comma is used when there is a tie.)
You will get more predictable results using a "standard" POSIX locale.
$ export LC_ALL=C
$ sort foo
140,22
2,86
236,224