Why is the data rate a function of the length of the transmission line?
SPI uses clock and data. From the sending (master) end, clock and data fly down their respective cables in sync (but delayed by the cable) and they reach the slave end and hey presto, the slave clocks in the data and does what it has to do but, what if it has to send back some data such as a value of something.

OK, it transmits its data synchronized to the local clock it is receiving and doesn't worry any more BUT, that local clock it receives is delayed by the cable and, the data the slave sends back to the master is further delayed by the cable and what happens at the master (when receiving data) is a mess unless the data rate is slow or the cable is short.

The main problem is that data sent from a slave is "timed" to the clock edges at the slave. The data received by the master is clocked into the master by the local clock at the master - the slave clock and master clock are not aligned due to the cable delay.



The OP has changed the question so here's some extra things about cable: -

Longer cables attenuate more - think about powering a motor from a battery - it works fine up close on short leads but if you make the leads longer the terminal voltage seen on the motor gets smaller and smaller as cable length increases. Copper is not zero-ohms.

It gets worse as frequency rises due to a phenomena called skin effect. skin effect reduces the conductivity of a copper wire by forcing currents to only be present in the skin of the conductor. This means smaller cross sectional area for the current hence higher resistance hence greater losses.

Dielectric loss in cable is proportional to frequency - basically energy is stolen from the signal to heat-up the insulating material between the two wires that form the transmission line or cable. This is what wiki says: -


  Attenuation (loss) per unit length, in decibels per meter. This is
  dependent on the loss in the dielectric material filling the cable,
  and resistive losses in the center conductor and outer shield. These
  losses are frequency dependent, the losses becoming higher as the
  frequency increases. Skin effect losses in the conductors can be
  reduced by increasing the diameter of the cable. A cable with twice
  the diameter will have half the skin effect resistance. Ignoring
  dielectric and other losses, the larger cable would halve the dB/meter
  loss. In designing a system, engineers consider not only the loss in
  the cable but also the loss in the connectors.


If losses are proportional to frequency then the likelihood of data corruption is also proportional to faster signals. Above a certain point there is another mechanism when cable (such as coax) starts to acts like a waveguide. Again wiki has the word: -


  In radio-frequency applications up to a few gigahertz, the wave
  propagates primarily in the transverse electric magnetic (TEM) mode,
  which means that the electric and magnetic fields are both
  perpendicular to the direction of propagation. However, above a
  certain cutoff frequency, transverse electric (TE) or transverse
  magnetic (TM) modes can also propagate, as they do in a waveguide. It
  is usually undesirable to transmit signals above the cutoff frequency,
  since it may cause multiple modes with different phase velocities to
  propagate, interfering with each other. The outer diameter is roughly
  inversely proportional to the cutoff frequency. A propagating
  surface-wave mode that does not involve or require the outer shield
  but only a single central conductor also exists in coax but this mode
  is effectively suppressed in coax of conventional geometry and common
  impedance. Electric field lines for this [TM] mode have a longitudinal
  component and require line lengths of a half-wavelength or longer.