We must not think of religious worship as having always followed the pattern of Rabbinical Judaism, Christianity and Islam, wherein worship consists of prayer, singing and listening to sermons and speeches. For Second Temple Judaism, practised at the time of Jesus, worship of God required the sacrifice of an animal proportionate to the wealth of the supplicant and the purpose of the worship. Rural Jews could bring their own sacrificial animals, but many Jews were inhabitants of Jerusalem or other towns, or had travelled from outside Judea, and needed to purchase the animals for sacrifice. Purchase at the Temple assured them that the animal was sound and healthy, as required for sacrifice to God.
The Old Testament tells us that God enjoyed the savour of animal sacrifices burnt on the altar. In a story from around the beginning of the first millennium BCE, we even find that God was displeased when Cain brought an offering of the fruit of the ground, but was well pleased when Abel offered the firstlings of his flocks (Genesis 4:3-5).
By the time the first gospel was written, the Temple was destroyed by the Romans, which meant that it was no longer possible to sacrifice at the Temple. Jews had to adopt new forms of worship, and perhaps the gospel author could pre-empt this disaster by reporting Jesus' displeasure at the sale of sacrificial animals.
For offerings to God.
One of the topics in the Torah (Leviticus ch.1-8) is that of sacrifices. Since the Holy Temple doesn't exist today, we don't now offer sacrifices. In earlier times, sacrifices were one of the ways of serving God; a type of manifest prayer. They consisted of bullocks, goats, sheep, rams, turtle-doves, or fine flour, accompanied by an offering of oil and of wine (see Numbers ch.15).Some offerings were obligatory and some were voluntary; some were for the individual and some were for the public. There was one set of offerings which was intended to provide merit for the non-Jewish nations as well.
Some of the ideas included in the sacrifices are:
gratitude (the Shelamim-offering, Leviticus ch.3),
dedication to God (the Olah-offering, Leviticus ch.1),
celebration (the Hagigah-offering during Festivals),
atonement (the sin-offerings, Leviticus ch.4-5),
and public worship (the offerings in Numbers ch.28-29).
Our traditions teach that as long as the sacrifices were offered in the Temple, the world was blessed (Talmud, Ketubot 10b) and atoned for (Sukkah 55b).
Note:
Some people have a misconception that the Prophets were not in favor of sacrifices. This is a mistake. The same Prophet Samuel who said that obedience is more important than offerings (1 Samuel ch.15), himself offered up sacrifices to God (1 Samuel ch.13).
What the Prophets meant was that repentance and obedience to God are essential; they shouldaccompany the sacrifices and cannot be replaced by the sacrifices (or anything else). All of the offerings are intended to be part of a process of drawing near to God. This ideal of offerings together with repentance is explained in the Talmud as well (Berakhot 23a). The Talmud adds that, similar to the offerings, Torah-study also needs to be accompanied by repentance (Berakhot 17a).
Another misconception is that Judaism changed after the Temple's destruction, and "turned from a sacrifice-centered religion" to one of prayer. This too is a mistake. Jews always worshiped in synagogues, even when the Holy Temple stood. Within the Temple premises itself, there were several synagogues. During the Second Temple era, ancient Greek authors attest to the large synagogues that stood in all the countries where Jews lived. The Dioploston in Alexandria, for example, was famous for its size (Talmud, Tosefta Sukkah 4:6). In First Temple times also, synagogues served the same function that they do today (Talmud, Megillah 26b and Berakhot 31a).
See also:
People were selling animals for sacrifice.
In the Temple in Jerusalem.
Well, they were not selling them in the Temple, they were selling them in an outer courtyard. Until it was destroyed, the Temple was a center where Jews brought animal sacrifices. The Torah, when it commands the sacrifices, says that you could bring your own animal, but if the distance was far, you could "turn your animal into money", then travel and buy an animal in Jerusalem to sacrifice. So, from the start, there was a livestock market at the Temple where animals could be purchased to sacrifice. The rules for sacrificial animals were fairly strict: The animals had to be without blemish. So, the market was under priestly supervision to assure that the animals sold there met the requirement.
Jesus then clensed the temple of the animals and turned the table of the money changers.
yes herod's temple is in Jerusalem
The First Temple was located on the Temple Mount in Jerusalem, the same location as the Second Temple.
In ancient times, various animals were sacrificed in the Temple in Jerusalem, usually kosher animals such as lambs, goats, and poultry. Grains were also offered as a sacrifice. After the Temple was destroyed in the year 70 CE, sacrifices were no longer performed, and were replaced by prayer.
Your question is ambigious. Jesus said our body is His temple.
People would visit a Temple or a Synagogue because they knew if they got rid of their sins then they would be accepted into heaven. Back in the time of Jesus it was a thing to do if you went to Jerusalem to go and see a temple and to get rid of your sins
Jesus was found in the temple in Jerusalem, known as the Temple of Jerusalem or the Temple of Solomon.
They went to the temple of Jerusalem at least three times each year, to worship the One God there, as commanded by the Torah (Deuteronomy ch.16).
As they were selling animals, and trading money.