No rights shall arise to either party out of an agency created for an illegal purpose.