1 reason I can think of is when copying and pasting - the text formatting used from where you copied the string from can come over with the text. So your not pasting in just a number but potentially html / css with it.
For obvious reasons, this could be a problem and instead of stripping the html / css / garbage - it's easier to just prevent the action entirely.