There are many variations, and tales of people taking half their adult life to write a thesis, but in the UK people are encouraged to submit a thesis within three to four years. Research Council studentships cover a three year study period and many people complete their research and submit their thesis within this time. As the university receives no money after this period, most charge a ‘writing up’ or ‘continuation fee’ to the student (they will not award the degree until this bill is paid). The fee is to allow you to use the universities facilities and is usually a reasonable one, designed to encourage you to finish rather than make money. Late submission of a thesis reflects badly on the supervisor and they will find it harder to get new grants from the research councils if they have a number of students taking more than 4 years to write up.
If a studentship is not funded by a UK research council, then the rules may be different. For example some schemes funded by overseas governments require the student to study for four years, allowing time for language tuition in the first year and extra time to write the thesis at the end (writing in a second language isn’t easy).