The factor function is a little bit silly.



There is a variable called savefactors  which you can read about.

Ordinarily, the first thing that factor() does is convert its argument to
canonical rational form,
which, among other things, expands it.

RJF