From what I remember Alfred Wallace had the same ideas as Charles Darwin. It might have been similar enough to work together on, but Darwin had been working on it for more than 20 years while Alfred Wallace only for a few months. So Darwin wanted the credit he deserved. That is why he rushed to publish the “Evoultion of species”
They didn’t work on the theory together. Darwin developed his theory in the 1830s but did not publish dues to his concerns about incompatability with theological doctrine. Having develop the greatest theory ever produced (it does answer the question “why are we here”) he locked it away in a drawer for some 20 years.
Wallace developed his theory independently of Darwin while he was in Indonesia. He was in communication with Darwin by mail and outlined it to him. Darwin felt that he deserved credit so he publisjed in England while Wallace remained overseas. It is to Darwin’s credit that he attributes the theory to both Wallace and himself.
However, as Darwin was the established scientific society figure (as a consequence mostly of his 7 years study of barnacles) and Wallace was a relative unknown, Darwin has persisted as the famous proponent of the theory.