No. The hostels were set up to provide cheap accommodation for pilgrims. There is no set rule that a pilgrim has to sleep in a hostel, which are called "albergue" in Spanish. Some pilgrims like to think you’re not a “true pilgrim” unless you sleep in barebones hostels. Utter nonsense! It’s totally OK to sleep in guesthouses all the way, or treat yourself to the luxury of a single room every now and then! The one benefit of hostels over hotels is that hostels offer the opportunity to easily connect with other pilgrims from all over the world. In my opinion, this is an important part of the Camino de Santiago.