Something slightly implied but maybe not explicitly stated above, is that in the normal format, UK students apply to university before taking their final exams. Thus, they apply on "predicted" grades, set by their teachers as what they expect the student to achieve, and universities make conditional offers based on that information i.e. the student is admitted on the condition they achieve the set offer. Students will not always achieve those offers, especially very high ones.
However the offer is not necessarily the minimum stated criteria on the university webpages, although typically it will be. However Oxbridge and their ilk are more likely to set higher than minimum offers, or more speciifc offers, if they feel a candidate is perhaps "borderline" and they want to see if the applicant can stretch themselves to a higher level. This may involve e.g. a higher offer overall (for example A*AA for an AAA course), or requiring a specific grade in a certain subject (for example an A*A*A course requiring one or both of the grades to be in say, Maths and/or Physics). Mathematics courses (and perhaps some Physics, Engineering, and CS courses, although I would think it is quite unusual) may also require STEP to be taken and specific grades achieved in that (STEP is an additional mathematics exam, covering the same material as the A-level Mathematics/Further Maths courses, but less formulaic and more "difficult" questions using the material).
More specifically regarding minimum criteria, these are as indicated, a minimum and depending on the strength of the "gathered field" of applicants, a competitive application may well need to exceed that considerably. This can vary depending on university and course - some courses are quite popular and hence competitive generally, as are certain universities. Others have specific courses at certain universities which are considerably more "competitive" than other courses there - Maths at Warwick for example. Additionally they will consider other aspects of your application - your personal statement, academic reference, and achieved grades in e.g. GCSE; if your personal statement is plagiarised and they detect that, you are likely to not get an offer even if you exceed stated requirements, and equally if it just says "lol I am awesome give me a degree" they will probably be unimpressed.
In terms of assessment of applications, as far as I'm aware universities in the UK are required to consider all applications received before the deadline equally, to ensure all candidates are on an equal footing. That said some courses have different deadlines to accommodate different assessment methods - for example Oxbridge and Medicine have an earlier date, due to the need to arrange interviews/review more material/provide time for applicants to take admissions assessment tests, and art/design courses often have a later March date to allow candidates to build up their portfolio for assessment. Broadly speaking though, for many courses if you meet the criteria in predicted grades you stand a good to very good chance of getting an offer, and if you firm the offer and then achieve it they are required to take you on. However a lot of that is easier said than done...
Edinburgh in particular notes on their admissions pages that the minimum entry criteria are as stated above, just a minimum, and for many courses considerably higher grades may be needed to make a competitive application. They aren't going to just hand out offers to the first 100 students who apply with the minimum criteria - they would much rather wait to see the applications and take the 100 students with the best applications (i.e. highest grades, best personal statements, references, etc, etc). As indicated above, I'm not really aware that applying earlier makes any difference, beyond the fact it's required for some courses - and for some (such as the art/design exception noted above, and also others that may required submission of written work or similar) it may be better to apply a little later nearer the deadline to have more time to organise a stronger application.
Following from this, in your example, provided both candidates applied before the deadline, then it's very likely the second candidate with better grades would be taken on - unless there were issues with other parts of the application. If the second applicant applied after the deadline the universities aren't required to consider the application, although they may consider it.