The reason why I'm asking is that the walls are also white so that by painting them white, it makes me wonder why we have trim at all?
Trim, however, is not there just to be painted a different color. It serves a purpose. It is there to hide the seams when carpet meets wall, wall meets ceiling, door jamb meets wall, etc. Without trim, your would have rough edges all over the place. Sometimes trim is placed in the middle of a wall to make a purely cosmetic transition, but along the edges of the walls, doors, and ceilings, it has a functional purpose. Trim thus is more of an easy way to cover seams than it is a decorative aspect that requires new color.
The upshot is that you can paint trim any complimentary color you want in any given room, or you can paint it the same color.