Those numbers are not arbitrarily picked (well... maybe 255/60/40 is arbitrarily picked).
To convert from log10 Q values like these (also used for error rates in FASTQ files) to probabilities, divide the number by 10, negate it, then raise 10 to the power of the result.
Another way of looking at it is to consider the decade to mean the number of 9s in the [mapping] accuracy, e.g.:
Q10: 90%
Q20: 99%
Q30: 99.9%
Q40: 99.99%
With the formula adjusted to make all the numbers in between a smooth transition.
With this transformation, a MAPQ score of 3 corresponds to a probability of an incorrect mapping of almost exactly 50%, which is as confident as you can be about a specific mapping if you know that it maps equally well to two locations:
> 10^-0.3
[1] 0.5011872
A MAPQ score of 2 is an incorrect mapping probability of 63% (i.e. close to 3 different locations), and a MAPQ of 1 is an incorrect mapping probability of 79% (close to 5 different locations). These fit with the numbers that you have described.
However, as you point out, BWA doesn't do this; it seems to ignore the number of mappable locations when considering the MAPQ score. I explore the reason why this is a problem in my question about multi-mapped reads.
I notice that there's a bit of an attempt to answer this in a similar previous question:
$C * (s_1 - s_2) / s_1,$
where $s_1$ and $s_2$ denoted the alignment scores of two best alignments and C
was some constant.
See the answer by user172818 for more insight into the details of BWA-MEM MAPQ scores.