How Bitcoin restricts the mining time?
We know cryptocurrency systems restrict the mining time of a block to a certain limit for security reasons. For example, mining time for Bitcoin is ~10 minutes. Some other cryptocurrency system have different mining time limit like 2-5 mins and so on. That restriction is imposed with a constraint i.e. precondition of number of leading ZEROs in the calculating hash for miners.
The question is how the cryptocurrency algorithm becomes certain that the mining time will be exactly as the imposed limit for miners? Like, theoretically it is never possible to get other miners strength in the network, no? Is it just based on approximation?
If it is based on approximation, then, What if all the miners in a group for a particular block are accidentally chosen poor? In that case the mining time will be more than 10 mins. It can even be 20 mins. Won't it violate the limit constraint?