"Soft" keyboards on a touchscreen have a number of disadvantages, the biggest for me is that they take up a large part of the screen. I could use the terminal or edit source code just fine on my phone's screen, but only if at least 40% of it wasn't taken up by a keyboard. Secondly, I think you're underestimating the number of "weird" sequences of characters programmers and terminal users regularly type.
Sure, a proper keyboard and a table is always better, but there are often situations where such a comfort isn't available.