It might be because they study or work at the university, of course. Apart from that there are lots of reasons. Here’s a few.
A side-effect of the university is that the city has a rich history and a thriving cultural scene, with a range of museums, galleries, and events taking place throughout the year. Cambridge is also home to a number of beautiful parks and green spaces, including the University of Cambridge’s extensive grounds and the River Cam, which runs through the centre of the city and is popular for punting. The city has a diverse range of independent shops, restaurants, and cafes, as well as a bustling market square. Additionally, Cambridge is well-connected to London and other major cities by road and rail, making it an convenient place to live for those who need to commute. It is also close to Stansted Airport, the ideal getaway for trips to Europe, perhaps a weekend getaway or a ski holiday.
It also is a centre for modern hi-tech companies, particularly in IT, AI and medical technology. This means it has a thriving job market for well-qualified graduates.
Overall, people may enjoy living in Cambridge for its cultural and intellectual atmosphere, beautiful setting, and good transport links.