William of Ockham (c. 1288--c. 1346), also known as Occam, wrote a long treatise on the Sacrament of the Altar. There he admitted (because the dogma of the Resurrection demanded it) that the glorified body of Christ in heaven was material. But the sacramental body of Christ was non-material, therefore non-spatial, like that of an angel. It could be present in a punctum, a point. The Scholastic theologians are often derided for debating how many angels could dance on the head of a pin. That is not a thing they would ever discuss, since their angels are non-spatial and pins are spatial, so never the two could meet.
Wills explains that the position of Thomas Aquinas won out over views like that of Occam. Thomas used an Aristotelean distinction between accidents and substance. However, as Wills explains, Thomas took Aristotle in a way Aristotle never imagined (p. 45):
Though Aristotle distinguished substance from accident, he did not (could not) separate them. A dog cannot exist without accidents like size. And there cannot be "a large" or "a white" standing alone without a substance. It has to be a large or a white something. An accident "comes along with" (symbainei) the thing that is its essence. Thomas admitted this natural truth: "An accident assumes what it is from its substance" (ST 3.77 a1r). But for the Eucharist, he posited a miraculous disruption of the natural order. He took the radical step of claiming that a substance can exist without its proper accidents, and accidents can exist without their proper substance, though only by a special action performed by God every time the priest says the words of consecration.
Wills further explains that there was an opposition to the position that Aquinas inherited and adopted (p. 49):
Thomas was forced to go to such lengths in caring for damaged Hosts because alternatives to transubstantiation were condemned by the church. One such alternative was offered in the ninth century by Ratramnus of Corbie, who said that Jesus was present in the Eucharist only symbolically (in figura), not physically. Ratramnus was rebuked by his superior, Paschasius Radbertus, who insisted on the real presence of Jesus in the Eucharist--which made Ratramnus's student Gottschalk of Orbais claim Paschasius was advocating cannibalism. The view of Paschasius was the dominating one for the next two centuries.
But then, in the eleventh century, the charismatic and ascetical Berengar of Tours renewed in a more sophisticated way what Ratramnus had argued for, that the Eucharist is Christ in figura (in symbol). Relying on Augustine's philosophy of the sign, Berengar said that the sign does not stand alone. It has to have a signifier and recipient of the sign. The whole system cannot function without this transaction. For him, the Eucharist was a dynamic system, in which the riches of salvation were offered to those with the faith to receive it.
There was also a liturgical aspect to this development. Wills explains (p. 51):
Even when the Host was not exposed in a monstrance, it was felt to be present within the altar tabernacle, its divinity signaled by a vigil lamp--not a sheltered matter of bread and wine but an abiding divine person to whom one "paid visits," worshiping, genuflecting, and praying to it. Alexander Nagel points out that, increasingly, from the fourteen to the sixteenth century, the tabernacle became larger and more central to churches.
In other words, the position adopted by Aquinas and calcified by Trent was a mutation, not an ancient tradition that was first disputed by the Reformers.