Trim is set prior to takeoff to counteract the pitching moment of a rear or forward centre of gravity. For example if an aircraft has been loaded at the aft CG limit the pilot will set a certain amount of nose down trim so that excessive control force is not required on take off.