Operators interpret the text loosely. Whereas formulas such as COUNTIF, SUMIF, etc are more strict in the data type. In your case, you have 2 data types: text and integers. You cannot put text when the formula is expecting to get numbers.
When you use the operators with a text, that text will be considered bigger than any number. Thus it will provide TRUE. Example: "aaple" >25, it will return true.