The birds, through natural selection, would evolve to have beaks that could gather beans.
What I mean by "natural selection" is that only the birds who could gather beans most effectively would survive, while the others die. Eventually, their beaks would become more and more effective in gathering beans.