The general rule is that the contract is king. It is assumed that the parties knew what they were doing when they negotiated the terms and therefore they should be binding.
In order to depart from the general rule you need to find a rule of law which allows you to do so. The applicable rule here is found at Section 62 of the Consumer Rights Act 2015:
(1) An unfair term of a consumer contract is not binding on the
consumer.
(4) A term is unfair if, contrary to the requirement of good faith, it
causes a significant imbalance in the parties' rights and obligations
under the contract to the detriment of the consumer.
(5) Whether a term is fair is to be determined —
(a) taking into account the nature of the subject matter of the
contract, and
(b) by reference to all the circumstances existing when the term was
agreed and to all of the other terms of the contract or of any other
contract on which it depends.
Section 63(1) provides:
Part 1 of Schedule 2 contains an indicative and non-exhaustive list of
terms of consumer contracts that may be regarded as unfair for the
purposes of this Part.
You can see the list in Part 1 of Schedule 2 here. As noted above, this list is non-exhaustive and non-binding so both of the following are possible:
A term may be unfair despite not falling within any of the categories in the list.
A term may be fair despite falling within one of the categories albeit the fact that it is in the list is likely to be persuasive.
Turning to the examples in the question, both Alice and Bob entered into 12 month contracts which (presumably) did not have a without-cause termination clause for either party (i.e. in the absence of some trigger such as a breach of contract, neither party can terminate within the first 12 months). In this sense, there is no "significant imbalance in the parties' rights and obligations". Bob cannot terminate if he decides he doesn't want the contract anymore, but neither can the phone provider.
Of the Schedule 2 items, the only one which seems relevant to me is this:
- A term which has the object or effect of requiring that, where the consumer decides not to conclude or perform the contract, the consumer
must pay the trader a disproportionately high sum in compensation or
for services which have not been supplied.
Perhaps Bob can argue that being made to pay the remaining monthly subscription fees is a "disproportionately high sum". Then again, considering these fees tend to be fairly low, a 12 month contract is very common across multiple different sectors and is not a very long period, and he still has the use of the phone, the term may be deemed fair.
EDIT: given Lag's link posted in the comments, it may well be possible to argue that the following may be unfair:
A contract longer than 12 months which cannot be terminated.
A contract shorter than 12 months which cannot be terminated if you can no longer use the service e.g. by moving out of the area.
Again, this would have to be viewed in light of Section 62 which requires an analysis of the nature of the contract subject matter, and all the surrounding circumstances. It may not necessarily follow that a decision affecting gym memberships (which are useless if you move away) would be applicable to mobile phone contracts (which are useable, at least in some sense, if you move away).