Why can a feedline be cut randomly when the antenna needs a specific length?
The reason you trim the antenna itself is so that the impedance at its base matches that of the transmission line (usually 50&Omega; for most RF applications).

It is a property of transmission lines in general that if it is terminated at both ends by its characteristic impedance, then the current and voltage measured anywhere along it will be the same. As long as this is true, it doesn't matter what the actual length of the line is; its properties won't vary.

However, if the antenna is not properly matched to the line, then you'll create "standing waves" on the line (current and voltage will vary along its length, depending on the wavelength of the signal), and the overall length of the line will have an effect on the operation of the system.