It is not illegal for someone to buy and own a car and have it registered in someone else's name. Neither is it illegal for someone other the owner to insure a car as the main driver, with the owner named as a second driver.
It is illegal if it is the named second driver who is the main driver. This is called 'fronting' and if you do a search on this Forum, you will find an explanation of how the insurance companies deal with this.
I am not sure that the owner/keeper has to be named on the insurance.
Some years ago, we knew a pub landlord who had never owned or driven a car. He and his wife used to need to be taxied around quite a bit (it was a village pub), so the landlord bought a car and it was insured in the name of the chap who drove them around. His perk was use of the car at all other times.