It is the command of God that is obeyed. If he demanded a certain quantity, one has to fulfill the quantity. ٖFive time prayre is demanded on their appointed times and a Muslim is required to fulfill this duty.
As far as quality is concerned, it is essential، as nothing is accepted without pure intention. All the Hudood of God are to be fulfilled, failing to which will lead to punishment:
تِلۡکَ حُدُوۡدُ اللّٰہِ ؕ وَ مَنۡ یُّطِعِ اللّٰہَ وَ رَسُوۡلَہٗ یُدۡخِلۡہُ جَنّٰتٍ تَجۡرِیۡ مِنۡ تَحۡتِہَا الۡاَنۡہٰرُ خٰلِدِیۡنَ فِیۡہَا ؕ وَ ذٰلِکَ الۡفَوۡزُ الۡعَظِیۡمُ ﴿۱۳﴾
وَ مَنۡ یَّعۡصِ اللّٰہَ وَ رَسُوۡلَہٗ وَ یَتَعَدَّ حُدُوۡدَہٗ یُدۡخِلۡہُ نَارًا خَالِدًا فِیۡہَا ۪ وَ لَہٗ عَذَابٌ مُّہِیۡنٌ ﴿۱۴﴾
These are the bounds set by God; [abide by them,] and [remember that] those who obey God and His Messenger, He shall admit them into orchards beneath which rivers flow. They shall remain in them forever and this alone is the supreme triumph.
And those who are disobedient to God and His Messenger and cross the bounds set by Him, He shall cast them into the Fire wherein they shall abide forever. And for them is a humiliating punishment.
However, for prayer it is specifically mentioned that the thing which lead to Hell is forsaking of prayer:
مَا سَلَكَكُمْ فِي سَقَرَ ﴿٤٢﴾ قَالُوا لَمْ نَكُ مِنَ الْمُصَلِّينَ
They will ask them: “What has brought you into Hell?” They will reply: “[To our misfortune,] we were not among those who prayed (74: 42-43)