Frames are stretched by custom builders, (like in the water truck business) by bolting fish plates over the welds, adding steel plate to the exterior, or even double framing the whole truck behind the cab, (we did a stretch with a double frame from the cab back). You can also stop the frame behind the rear axle and drop it down for a garage or basement and end up with a longer coach than the frame rails will allow.
It is certainly less expensive to start with a frame that is long enough for your conversion.
Another factor is the type of rear suspension and gearing you want to end up with, (and the cost associated with a swap)
Some builders have very little overhang behind the rear axles. In those cases you will need a longer frame, AND a front axle rated fairly high. This is because most of the weight of your coach will be split between the front and rear, (between the axles)
Other builders have more overhang and are able to pull weight off of the front axle by placing holding tanks, etc behind the rear axle. Your truck will probably come with a front axle rated at 12-13k. If you have a long wheelbase with a small overhang you will be overweight on the front and have some cost associated with a front axle upgrade.
Your design preferences will also affect frame length and axle placement.
Other considerations are handling, maneuverability, wheelbase and ground clearance. A long wheelbase can cause ground clearance and turning radius problems. With a short wheelbase you need to think about dragging the rear end on the ground and the swing of the overhang, (I don't think you'd ever want to go less than 55% ratio wheelbase/length on a class 8, although some motorhomes are less).