A speaker installed in a sealed enclosure has the air inside the enclosure acting as a suspension, like a spring, often referred to as an "air suspension" to help provide recoil force for the movement of the diaphragm. Ported enclosures (bass reflex) also can have the air inside act as a spring as long as the hole in the box is small enough to provide enough resistance to the movement of the air. This design is more efficient for bass reproduction. The air in the enclosure will be able to move enough to resonate within the enclosure, the resonate freqency depends on the diameter, length & shape of the port, and size and shape of the box, which all yield the cumulative effect of determining the acoustic properties the air within the enclosure. The speaker driver and tuning of the port must coincide properly so as the tuning of the port will have an additive effect of increased bass output at the proper freqencies. At other frequencies the port can be tuned to provide more resistance and provide dampening to the woofer. This is a pretty complex relationship that can be easily done improperly yielding freq response curves that are laughable, but if done properly, can give a lot of bank for the buck. I don't want to go into too much detail as there are books out there that would explain this far better than I could, but hopefully this helps a little. As far as would plugging the port hurt the speaker, doubtful, but if the speaker was properly engineered, plugging the port would result in the woofer not responding as intended over certain freqencies, so I doubt it would sound better, again that is assuming the speaker was engineered properly.
Brad