Why do Pentecostals believe in a closed canon? Pentecostals believe the gift of prophecy continues to the present day. From what I understand, most Christians believe the gift of prophecy is what enabled the writers of Scripture to write "inspired" works. So why do Pentecostals believe in a closed canon if they believe in continuing revelation?
Yes, Pentecostals believe that the gift of prophecy continues to the present day.  However, there is a difference between someone exercising the gift of prophecy and the apostles that were divinely inspired to write Scripture.
In the book Foundations of Pentecostal Theology, in the chapter on Bibliology, authors Duffield and Van Cleave discuss the difference between the gift of prophesy today and the inspiration of Scripture:

The Holy Spirit and the Scriptures
Inspiration accounts for inerrancy, and inerrancy proves inspiration.  This miracle of infallible inspiration is said to be the ministry of the Holy Spirit.  This might well be the very greatest ministry in which the Spirit is engaged.  All Spirit-filled believers have known, to some degree, the miracle of Divine inspiration by the Holy Spirit, but never to the extent experienced by the writers of Scripture.
The Pentecostal Movement has been accused of being an experience-centered movement, and indeed it is!  But it is also a Bible-centered movement.  It is beautiful to see how the Holy Spirit and the written Word are always in perfect agreement.  This must be so, because the Word is the result of the inspiration of the Spirit....
If any people should be people of the Word of God, it should be those who believe in the Pentecostal Baptism with the Holy Spirit.  They have an inspirational ministry.  They believe in prophecy, in speaking with other tongues with interpretation, in inspirational revelations.  How can one tell if these come from God or not?  Just because one claims to have a revelation from the Lord does not mean it should be accepted as if it was from God.  There needs to be a norm, a final court of appeal, by which all manifestations of the gifts of the Spirit can be judged.  In fact, the Scripture admonishes the judging of all prophecy, which Paul recognizes as perhaps the greatest of gifts. &quot;Let the prophets speak two or three, and let the other judge&quot; (1 Cor. 14:29).  &quot;To the law and to the testimony: if they speak not according to this word, it is because there is no light in them&quot; (Is. 8:20).  There is such a &quot;court of appeal&quot; to which one can come.  It is the written Word, which the Holy Spirit inspired.  Peter calls it &quot;a more sure word of prophecy; whereunto ye do well that ye take heed, as a light that shineth in a dark place&quot; (2 Pt. 1:19).  Those who minister, in any capacity whatever, are never so fully &quot;in the Spirit&quot; as when they are doing so in full accord with the clearly revealed teaching of the Bible, the Word of God.  &quot;He that hath an ear, let him hear what the Spirit saith unto the churches,&quot; is an admonition which is given seven (7) times in the book of Revelation (2:7, 11, 17, 29; 3:6, 13, 22) and each time it follows a written epistle from the Lord Jesus Christ Himself.