The Variables in Projectile Motion on a trebuchet:
Release angle: As shown in the picture above; too high of a release angle and the projectile will go high rather than far. But too low of a release angle and the projectile goes far, but not as far as a projectile that has height. Therefore if 90 degrees is too high and 0 degrees is too low, the perfect angle is 45 degrees.
Gravity: Gravity will always affect the projectile no matter where its released at. The projectile's inertia wants it to go at what ever angle released, but gravity impedes on the inertia causing the projectile to come back to the ground. That's why its key to have height in your projectile because if too low, gravity will act down really quickly since the projectile is close to the ground, causing the distance to be short.
The speed of the projectile: The higher speed the projectile has, the faster it will go. The faster it goes, the more time it has to travel before gravity forces the projectile back onto the ground. Therefor if the projectile is slow, it wont travel as far.
Modifications:
Perfect Release Angle: If the projectile is launched at the perfect release angle of 45 degrees, it has the perfect balance of distance and height giving it the best chance of increasing range.
Speed: The faster the projectile is going, the more distance you can cover. Therefor putting as much weight as possible will increase energy and force causing an increase in speed of the projectile allowing it to cover as much distance as possible before gravity effectively puts it back on the ground.