If you use parts, such as gears, screws, pulleys, etc., they are available in different sizes; it's less expensive to purchase an existing size part, as opposed to custom manufacturing something, but sometimes it's necessary to use a minimum number of customized parts to consolidate a portion of the mechanism.
The material you use to manufacture your device has various qualities such as melting point, elongation or bendability, and strength; these qualities must be sufficient to ensure the life of the device.
Your device may require certain properties such as salt resistance, polishability, recyclability, etc.
All those factors and more go into the design, that also must be balanced with cost and availability. This doesn't have a short simple answer, and the answer varies for each device and its application, etc.