Preferable because you get a cleaner look and painters probably don't install trim.
+1
Especially when you paint it a different color than the wall.
The only "downside" is that you won't be painting over the tiny nail holes which you made when attaching it
You can always touch it up later
ETA
To really be a perfectionist, you can paint the side and edges, put it up and paint the rest after it's up.
