Pets are considered to be the legal property of their owners. Finding a pet does not entitle the finder to keep, sell or give away the animal, nor does it convey ownership to the finder. If you find a pet, you must actively look for the animal's owner for at least 90 days, and even then, the owner still has rights to reclaim their pet under many circumstances.
Penal Code 485 states: "One who finds lost property . . . without first making REASONABLE AND JUST EFFORTS TO FIND THE OWNER AND TO RESTORE THE PROPERTY TO HIM, is guilty of theft."
Part of this is reporting the found animal to the shelter servicing the area where the animal was found, and following their policies and procedures for strays, even if you have the animal checked for a microchip on your own.