Regardless if the previous owners/realtor says they just changed the locks... when you buy first thing you do is change all the locks and make sure your windows are secure... Many times previous owners will hide a key and forget about it when selling... So best to always change them..
Not just when you buy. Over here most rent a house, from council. Before new tenants move into a house all locks are replaced by council. They just swap the locks from all their houses so it doesn't cost anything much, nor do you waste good things.
Front & backdoor locks and keys are always the same over here, often even the shed's.
So they keep the sets and put them in another house. No one knows which one or where.
Just in case a previous tenant kept a key or forgot.