I perfectly know how to convert these units, but I don't understand if there's a specific reason for choosing one instead of another. What troubles me the most about them is the difference between yards and miles. Does it depend on the country you are from or is it just a personal choice with no difference? I may be wrong but I noticed that miles are more often used when talking about a distance to travel (drive or walk), whereas yards when referring to an unpaved distance. thanks
In which country are you interested? The position in America may be different to Britain, and different again in Australia (which has gone fully metric).
In Britain we have a hotch-potch of metric and imperial.
Whilst "miles" is still used for distance, "yards" have largely given way to "metres". (My son, when a young boy would sometimes ask me how many metres there were in a mile - which left me nonplussed for a response).
When measuring height both "metres" (mountaineering) and "feet" (aviation) are used.
"Hectares" (metric), at a professional level, have largely supplanted "acres" (imperial) in land measurement. But estate agents sometimes talk about "square feet" of office space - though on sale brochures it is usually "square metres".
In supermarkets everything has to be labelled in metric (grams, litres etc) by law, beer and milk being the only commodities which it is still lawful to measure only in "pints". (Remember those are "imperial pints" - not "US pints").
Confusingly, milk sold in plastic containers in supermarkets is invariably in litres/millilitres, but the quantity usually corresponds to an exact number of pints (which is how people continue to think about it). A bottle in our fridge right now is marked thus both in metric and imperial - "1.136 litres, 2 pints". Milk from one of the remaining delivering milkman in glass bottles, is almost always in pints.
Petrol is sold in "litres", but car fuel efficiency still quoted in "miles per gallon" (imperial gallons).
There are numerous other such idiosyncracies in Britain, a country which stands at the crossroads of Europe and the English-speaking diaspora.
Use what is customary. If there is no custom, use what is most euphonious.
For example, if I were making a lot of dresses, I might buy 3,500 yards of material, because that is the unit in which material is sold. It would be odd to say I was buying 2 miles of material.
Americans speak of "a thousand-yard stare". If you were literally staring at something 940 yards away, it would be just as accurate to call it a half-mile stare, but I would think you'd use the more common form of the expression.