There are two questions about residence:
Ordinary residence: Which public body is responsible for providing services?
Right of residence: Does the person’s residence and status in the UK give them a legal right to access public services?
Residence and ordinary residence
If someone is entitled to services, the question is which authority is required to arrange them and, therefore, pay for them. Generally it is the authority for the area where they are “ordinarily resident”.
Once upon a time someone probably thought this was a simple enough idea but we have managed to complicate it mightily. Ordinary residence means a place voluntarily adopted as a settled home. What about people without capacity to adopt any residence or people who are compelled to live in certain places?
Many (but not all) of the statutes disregard any period when the person was accommodated. The effect of this is that one authority cannot change ordinary residence by placing someone in another authority but sometimes this leaves an authority responsible despite the service user having no remaining contact with that authority.
The Court went through all this in detail at the end of 2012 in R (ota Cornwall) v SoS for Health  EWHC 3739, a challenge to an ordinary residence determination by the Secretary of State. PH lived in Wiltshire and was accommodated by them in South Gloucestershire under Children Act 1989.
Later the same year his parents moved to Cornwall. PH turned 18 and there was a plan to move him to Somerset. Where was he “ordinarily resident”? Any answer would lead to difficulties. PH had never lived in Somerset or Cornwall.
He had no remaining links with Wiltshire. By the time of his 18th birthday his links with South Gloucestershire were short lived. The Court accepted the Secretary of State’s decision that PH’s ordinary residence followed his parents (see also R v Waltham Forest ex p Vale 1 January 1985).
This is a potentially important decision for local authorities as in many cases authorities have retained responsibility for children for some years after their parents left the area, relying on s105(6) Children Act 1989 – a provision that any periods when a child is provided with accommodation should be disregarded in calculating ordinary residence.
Section 105(6) produces questions of broad principle and narrow detail. A remarkable recent example of case specific detail concerned a child in care placed out of her home area who gave birth to a baby who was also taken into care. The baby’s ordinary residence should follow the mother’s. But the mother was accommodated and so her own ordinary residence was frozen by s105(6). The Court of Appeal decided that this sort of infinite regress was not what the Children Act was meant to do and gave responsibility for the baby to the authority where she was living (Re D (Care Order: Designated local authority)  EWCA Civ 627).
The best known quirk is the right to after-care services in s117 Mental Health Act 1983 where responsibility is on the “authority for the area in which the person concerned is resident…”. The Court of Appeal held that this does not mean ordinarily resident and that the provisions in the NAA 1948 disregarding periods when an adult is in local authority accommodation do not apply (R (ota M) v Hammersmith and Fulham  ACD 60).
There seems to be more consideration of whether the authority remains responsible for making service provision, perhaps arising from the pressure on local authority budgets.
Right of residence and access to services
The right to access services at all depends on the statutory scheme in question and complex questions of nationality and EU law. Over the years the Courts have considered most systems of state provision. In late 2012 the Administrative Court considered student support and decided that the requirement for 3 years ordinary residence in the UK in order to access support meant 3 years lawful residence (R (ota Arogundade) v Secretary of State for Business  All ER 52).
Access to community care services is regularly litigated and subject to many statutory provisions. Statute often limits services to people lawfully in the UK but with important exceptions and discretions – reflecting in part a process of statute reacting to earlier judgments and so on. So, for example, the Court of Appeal held that residential accommodation under s21 of the NAA 1948 was not to be denied on grounds that the claimant was unlawfully in the UK largely because it was a scheme of “last resort” (R v Wandsworth ex p O  1 WLR 2539). However access to community care services is now primarily determined by Schedule 3 NIAA 2002. This seeks to deny access to some services for some people but is subject to exceptions to allow compliance with EU treaties and Human Rights Act.
NHS services are limited to people lawfully in the UK but health providers have a discretion not to charge nationals of other countries (s1 National Health Service Act 2006 and R (A) v Secretary of State for Health  1 WLR 279). That discretion is often, indeed generally, exercised in favour of providing services.
Access to benefits again varies from benefit to benefit. The requirement for “habitual residence” in the UK to claim non-contributory benefits has been held to be indirect discrimination on grounds of nationality but justified by the policy goal that claimants had “economic or social integration in the UK” (Patmalniece v Secretary of State for Work and Pensions  1 WLR 783).
The essential contending principles are the sense of common humanity on the one hand (see ex p O) and the idea that people should not obtain unlawfully what they could not obtain lawfully (R v London Borough of Barnet ex p Shah  2 AC 309). In a number of these cases decisions of the Courts have been reversed or modified by subsequent legislation – a fact which led Lord Sumption to suggest in his Mann lecture 2011 that Courts were refusing to give effect to the intention of Parliament and had become too interventionist.
At a more prosaic level residence and access to services – in both senses set out above – provide difficult technical and factual questions with considerable implications.