Understanding L-Pad attenuator
Andy Aka's answer is definitely correct and provides good insight into the problem. Here I will just try to provide an answer to

Why are there these logarithmic equations with a 'K' value solving for \$R_1\$ and \$R_2\$?

Such equations provide a direct link between the attenuation you want to obtain and the resistors in your L-pad attenuator when source and load impedances are the same (\$Z_S=Z_L\$, as you can see in the tutorial you mention) and you want to match your attenuator to the source impedance (not an optimal choice, as the tutorial itself points out).
\$K\$ is defined as an attenuation, i.e. the inverse of the &quot;gain&quot; \$V_{OUT}/V_{IN}\$ (if we choose to consider voltages): \$K\triangleq V_{IN}/V_{OUT}\$. In this way, what the tutorial calls \$dB\$ is of course just \$K\$ expressed in decibel: \$dB=20\log(K)\$.
Then, \$V_{OUT}=V_{IN}\frac{R_2||Z_L}{R_1+R_2||Z_L}=V_{IN}\frac{Z_S-R1}{Z_S}\$ since \$Z_S=R_1+R_2||Z_L\$ is the condition for source matching. After some algebra we obtain \$R_1=Z_S\frac{K-1}{K}=Z_S\frac{10^{dB/20}-1}{10^{dB/20}}\$ as reported in the tutorial.
The formula for \$R_2\$ can be obtained by substituting the above result for \$R_1\$ into \$Z_S\$ and expanding the parallel resistor \$R_2||Z_L\$: \$Z_S=Z_S\frac{K-1}{K}+\frac{R_2Z_L}{R_2+Z_L}\$. Then recall that \$Z_S=Z_L\$ and solve in \$R_2\$.
The above allows you to set the desired attenuation \$K\$ through a circuit that is matched to your source only, as you can easily see by taking the values obtained in the tutorial: \$Z_S=Z_L=R_2=8\,\Omega\$ and \$R_1=4\,\Omega\$.