כִּ֠י אִֽם־אֶל־הַמָּק֞וֹם אֲשֶׁר־יִבְחַ֨ר יְהוָ֤ה אֱלֹֽהֵיכֶם֙ מִכָּל־שִׁבְטֵיכֶ֔ם לָשׂ֥וּם אֶת־שְׁמ֖וֹ שָׁ֑ם לְשִׁכְנ֥וֹ תִדְרְשׁ֖וּ וּבָ֥אתָ שָֽׁמָּה׃
But unto the place which the LORD your God shall choose out of all your tribes to put His name there, even unto His habitation shall ye seek, and thither thou shalt come;
Tosefta Chagigah
One who is impure is exempt from appearing [before the Temple on the three festivals], as it says (Deut. 12:5-6), "you are to come there and you are to bring there [your burnt-offerings and your sacrifices]." Since one must be [ritually] fit to enter the Temple Courtyard, consequently one who is impure, who is not fit to enter the Temple Courtyard[, is exempt from appearing].