What is the underlying mechanism behind Wi-Fi getting slower with greater distance?
Explanation

So, the speed of light has (practically) nothing to do with it, you're right.

WiFi chooses a transmission mode based on the quality of the link between two stations. The worse the link, the more robust the transmission needs to be. One way to get worse is to have a longer link, which means that less signal energy reaches the receiving end, which means that the ratio between noise inherent to the receiver and signal received gets worse; this is typically measured as SNR (Signal-to-Noise ratio). So, that's how distance directly comes into this.

To make a transmission more robust, there's different things that WiFi (IEEE802.11 a/g/n/ac…) does:


Use a less fine modulation. If you've dealt with digital wireless communications before, you might have heard that information is transported by modulating a carrier wave with one of a set of symbols, which are basically just complex numbers. The larger that set of symbols is, the more bits you can transport with each symbol you transmit, but also, the closer these symbols are to each other. Closer means you need less noise power to accidentally end up in a different symbol. So, if your speed needs to be high, you'd typically would try to use a constellation with a lot of symbols, but then you can only tolerate very little noise compared to your received power, i.e. you need high SNR.
Wireless links (generally, all non-trivial data links) employ something that we call channel coding, and especially forward error correction: It's basically adding redundancy to your data (e.g. in the shape of repeating the same data twice, or by adding a checksum, or by a lot of other means). If you're designing your channel code and your decoder cleverly, more redundancy means you can correct a lot of errors. The more redundancy, the more error correction. Downside of that, of course, is that instead of transporting more "interesting" data, you're forced to transport that redundancy. So, if you use a channel code that adds twice the amount of original data as redundancy to be able to deal with a lot of errors (see 1.), then you can only use 1/3 of your physical bit rate for actual payload bits.




Advanced Commentary


  It's common knowledge that the further you go from a Wi-Fi network point, the slower the network over Wi-Fi gets.


Common knowledge, as usual, is a gross oversimplification. The general tendency is right, the further away, the less power, as explained above. 

Multipath Channels means things don't go monotonically downhill with distance

But: WiFi is typically used indoors. In these settings, we have what we call a strong multipath scenario. That means that due to reflections on walls, furniture, things that happen to be in the general surroundings, you can get different kinds of signal self-interference. And that might mean that, although you're relatively close to the transmitter, your receiver might see nothing, because two paths just happen to have a way difference of half a wavelength, and cancel out each other.

So, for the typical indoor multipath, you can't generally say "the further, the worse"; it's usually far less easy. We call that phenomenon fading (and in this case, probably small-scale fading).

Channel Diversity for Robustness gains

Then: The more modern WiFi standards support MIMO (Multiple input, multiple output), which basically means you have multiple antennas on each end of a link. The idea is that from transmit antenna 1 to receive antenna 1 (let's call that 1->1) there will (with a high probability) be a different channel realization (channels are random!) than from transmit antenna 2 to receive antenna 1 (2->1), and 1->2, and 2->2, and so on. 

These physically different channels can help with the fading problem mentioned above. Though the multipath channel 1->1 might, randomly, be badly hurt by cancelling itself, 1->2 might still be OK. Your average "badness probability" goes down with the number of antennas. Nice! That means the more our channels are uncorrelated (i.e. the less likely failure of one channel means that the others will also be bad), the better our transmission can be. 

That also means that "very close" isn't inherently "very good", because that also means that, probably, the different antennas see pretty much the same channel realization, so you don't get that "security" of "nah, it's unlikely that all channels are bad at the same time".

Employing MIMO for fun &amp; profit (and higher rates)

Furthermore, if you're being mathematically clever about this, you can find a mathematical description for a channel between transmit antenna \$i\$ and receive antenna \$j\$, let's call that represenation \$\mathbf h_{i,j}\$, and then simply build a matrix \$\mathbf H\$ out of these channel representations, with the row number saying which transmit antenna we're talking about, and the column number saying which receive antenna. 

To see what we receive on our receive antennas when we send different signals on the different transmit antennas, we'd just go ahead and multiply a row vector \$\mathbf s\$ containing all these signals with the channel matrix \$\mathbf H\$:

$$\mathbf r = \mathbf s \mathbf H\text.\tag 1$$ 

Problem is that we'd probably like to have a lot of totally independent channels between transmit and receive, i.e. so that what we send on one antenna to one antenna has no effect on all the other antenna pairs. Then, we can send multiple streams of data in parallel. That will give us a serious increase in transmission speed!

Sadly, that equation above says that we somehow have to weigh and add up all the transmit signals to get each antenna's receive signal. Hm, sad.

Now, armed with that equation, the inner mathematician in us tells us that, hm, if we could could make it so that we transform \$\mathbf H\$ to some other matrix \$\mathbf \Lambda\$, we might be having actually independent channels. 

That's possible if \$\mathbf \Lambda\$ is of diagonal shape, i.e. it's all zeros, but for its diagonal entries. Happy fact is that we can actually do that! There's a mathematical method that gives us 

$$ \mathbf H = \mathbf{U\Lambda V^*}\tag 2$$

with \$\mathbf \Lambda\$ being diagonal; it's the singular value decomposition (SVD). So, we can rewrite \$(1)\$ to 

$$ \mathbf r = \mathbf{sU\Lambda V^*}\text.\tag 3$$

Now, that's not really helping us, because although we have now just found another way of denoting our channel matrix, this formula still (replaced by some other way of writing it down) the original \$\mathbf H\$, which said that all antennas interfere with each other. But look at this magic trick: Let's multiply with \$\mathbf V\$ from the right. Since  \$\mathbf V\$ is a *unitary matrix,  \$\mathbf {V^*V}=\mathbf I\$:

$$\begin{align}
\mathbf {rV} &amp;= \mathbf{sHV}\tag 4\\
&amp;=\mathbf{sU\Lambda V^*V}\tag 5\\
&amp;=\mathbf{sU\Lambda I}\tag 6\\ 
&amp;=\mathbf{sU\Lambda}\tag 7\\
\end{align}$$

Niiiiice. Read \$(7)\$ again, aloud:


  If if we multiply the receive signal with \$\mathbf V\$, our channel effect is actually reduced to a diagonal matrix, and we can send arbitrary \$\mathbf s\$ over that channel, if we just first multiply them with \$\mathbf U\$. Diagonal matrix means we just get as many independent channels as there's diagonal entries, i.e. \$\min(\$receive antennas, transmit antennas\$)\$).


So, the algorithm becomes pretty easy:


Measure \$\mathbf H\$, i.e. the channel matrix containing all channels on all antenna parts. This is actually the hardest part.
Do the SVD on \$\mathbf H\$, giving us \$\mathbf{U\Lambda V^*}\$.
On the transmitter side, multiply our intended transmit signal \$\mathbf s\$ with \$\mathbf U\$.
On the receiver side, multiply our receive signal  \$\mathbf r\$ with \$\mathbf V\$.




This all only works if the SVD gives good results, and that only happens when the physical antenna pair channels are independent enough. That means that for MIMO, close proximity means you can actually potentially transmit even less than for a medium distance, because distance means that there's more different, random reflectors on the way. (After some distance, the path loss effects dominate, and you always get worse.)