The prohibition concerned specifically fava beans (vicia faba), associated with hemolytic response (rupturing of red blood cells) in some people, called favism. In a milder form, it causes excessive gas that Diogenes Laertius described as "disturbing".
Reasons for the taboo were controversial already in antiquity, with Aristotle, Diogenes, Iamblichus and Varro giving different explanations, and modern scholars argue that the taboo was supported by a combination of medical, mythological and ritualistic factors they cite. However, the shape of the fetus was not among them, see Scarborough, Beans, Pythagoras, Taboos, and Ancient Dietetics for a survey of ancient sources and modern scholarship:
"On the one hand, Schumacher and Lieber have given a series of carefully documented arguments detailing the social context of the taboo, and the ancient sources from Aristotle to Iamblichus support this approach and the consequent interpretations. Yet this conclusion... is but one part of the intricate matrix that led to the formulation of the bean prohibition, among numerous other dicta followed by the Pythagoreans.
There is also some evidence to show that ancient medical dietetics recognized a form of favism, but that this did not necessarily cause Greek and Roman physicians to forbid the eating of beans. Added is the ancient evidence which indicates how much debate raged in classical antiquity about why the Pythagoreans proscribed beans, ranging from Aristotle's statement that beans are "like the gates of Hades" to Varro's report that beans contain the souls of the dead. Ancient observers of the strict rituals of the Pythagorean community did assume an "explanation" of occasional magic, but modern scholars who presume these ancient guesses (perhaps mainly from pique) correct have ignored the historical and social context of those negative views held by observers outside the tightly-knit Pythagorean community.
Neither a strictly medical nor a completely magico-religious explanation is satisfactory, since even ancient critics of the Pythagoreans acknowledge the aspects of Pythagoreanism that spanned the range of human knowledge from pure magic to pure mathematics... One can, therefore, add to Lieber's succinct piece the collection of multifarious data assembled by Burkert, who argues for the bean taboo on the basis of the Pythagorean "seer" being incredibly sensitive to "small physical disturbances".
Favism, as Lieber writes, would fit nicely here, but one must also presume, in the words of Burkert, that "the Pythagorean taboos are closely connected with ritual, either taken over from it or set up in opposition to it." Thus, combining Lieber's penetrating analysis with Burkert's painstaking assembly of ancient evidence and close readings of the multiple interrelationships among the varying aspects of Pythagoreanism, one has an interpretation of the Pythagorean bean taboo that combines the medical, dietetic, epidemiological, magico-religious, and historico-contextual evidence."