Vedic knowledge is infallible because it comes down through the perfect disciplic succession of spiritual masters, beginning with the Lord Himself. Since He spoke the first word of Vedic knowledge, the source of this knowledge is transcendental. The words spoken by the Lord are called apauruṣeya, which indicates that they are not delivered by any mundane person. A living being who lives in the mundane world has four defects:
1. He is certain to commit mistakes
2. He is subject to illusion
3. He has a propensity to cheat others
4. His senses are imperfect.
No one with these four imperfections can deliver perfect knowledge. The Vedas are not produced by such an imperfect creature. Vedic knowledge was originally imparted by the Lord into the heart of Brahmā, the first created living being, and Brahmā in his turn disseminated this knowledge to his sons and disciples, who have handed it down through history.
A lot of scriptural things may not sound dharmic. To an alcoholic, 'no intoxication' as a scriptural injunction may seem inappropriate. Does that make the scripture imperfect, or is the judgement of the person imperfect, because of his addiction?
There is a prescribed method for everything. To cure a disease, I must take the medicine as prescribed by the doctor and not based on my intelligence and likes/dislikes. Similarly, there is a method of purification for reaching the divine.
Lord Kṛṣṇa in the Bhagavad Gītā says:
ajñaś cāśraddadhānaś ca
saḿśayātmā vinaśyati
nāyaḿ loko 'sti na paro
na sukhaḿ saḿśayātmanaḥ
But ignorant and faithless persons who doubt the revealed scriptures do not attain God consciousness; they fall down. For the doubting soul there is happiness neither in this world nor in the next.[B.G.4.40]