This is really a question for the Maxima community because it is related to the behaviour of the CAS, and not any specific design decisions made in STACK.
The failure to factor is all about constants of integration:
That said, using a desktop Maxima session, there is an interesting difference between
You can use Maxima functions such as "changevar" to help a little here, and create some intermediates variables. In STACK these are often useful in a worked solution.
If you really want to get to the bottom of why Maxima does this, then I suggest you email the mailing list: