Summary
Consider the following indefinite integrals:
A) $$\int (2 + 3) dx = 5\ + C$$
B) $$\int (2 + 3x) dx = 2x + \frac{3x^2}{2}\ + C$$
As you can see, simply appending $x$ after $3$ also affects $2$. This doesn't appear to be consistent to me. I can see how A is correct assuming that you pull the constants out of the integration. I can also see how B is correct assuming you don't pull the constant out of the integral.
Question(s)
Why is the number $2$ treated differently between the two integrals? Or, as the title of the question implies: why aren't we finding the antiderivative of the number $2$ in A, but we ARE in B?
Edit: 4/18/2018
As commenters have explained, it turns out that cymath is incorrectly evaluating the integral (A) above. It should be...
$$\int (2 + 3) dx = 5x\ + C$$
...which shows consistency between A and B.
The number $2$ isn't treated differently between the two antiderivatives.
Your first example $\int{2+3}dx$ can be rewritten as the following. $$\int{2x^0+3x^0}dx$$ Applying the same rule you used in your second example, it is easier to see that this becomes $5x+C$.
Your second example is correct. This antiderivative has an extra term so it gets dealt with accordingly. That is, $\int{2+3x}dx=2x+\frac{3x^2}{2}+C$.
In summary, the constant will always have an antiderivative. Reading the comments as I finish typing this answer, it appears that Cymath is incorrect in this case.