Why Signal-to-noise ratio (SNR) is measured in $\rm dB$? I understand that the signal to noise ratio is
$$
\text{SNR}=\frac{P_\text{signal}}{P_\text{noise}}
=\left(\frac{A_\text{signal}}{A_\text{noise}}\right)^2
$$
My question is why SNR is measured in $\rm dB$ even though SNR is simply a ratio? So the units shouldn't be cancelled out?
 A: You're absolutely correct that SNR, being a ratio, is dimensionless.
Now, the "dimension" dB (see Wikipedia) is not really a physical dimension like meters, seconds, or kilograms. Instead it's a special way to express dimensionless ratios using a logarithmic scale (see the table in the Wikipedia link). I only know of usages for expressing electric / electro-magnetic / acoustic power ratios.
The (rarely used) "base unit" Bel corresponds to a ratio of 10, meaning that 0 Bel is a factor of 1, 1 Bel a factor of 10, 2 Bel a factor of 100, and so on.
"dB" is a derived unit, being deci-Bel, i.e. one tenth of a Bel. So, 0 dB is a factor of 1, 10 dB a factor of 10, 20 dB a factor of 100, and so on.
As a final remark, of course your SNR formula does not give dB values, but simply ratios. Converting that to dB still needs to calculate the logarithm.
A: Decibels are a very good way of expressing the magnitude of ratios as the scale is logarithmic, $R_\text{dB}=10\text{log}_{10}(P_1/P_0)$, where in your case $P_1=P_{signal}$, and $P_0=P_{noise}$. For example, if the ratio between the power of two signals is $10^{10}$ this is simply expressed as 100dB. Signal to noise ratios are usually expressed in dB because you are measuring a ratio. I'm not sure why you think the units don't cancel out in the ratio, if the numerator and denominator share the same units the ratio is dimensionless.
