Let me start from the beginning.
If we are interested in the energy eigenstates of a free particle, we face the problem of their non-normalizability. A simple solution is to confine the particle in a large space where no interaction is present, bounded by hard walls, i.e., infinite energy barriers limiting the accessible configuration space. However, such a solution introduces important modifications of the wavefunctions near the wall, and the resulting expectation values will contain significant surface effects. The vanishing of the wavefunction near the wall implies, for example, that the probability density of finding a particle near the wall vanishes similarly.
Periodic boundary conditions (PBC) minimize such a boundary effect. The probability density remains constant over the whole finite volume independently of the distance from the boundary like in any finite portion of an infinite system. On the other hand, it is possible to prove that the behavior of the observable quantities, when the volume where the particle is free is significant, is independent of the boundary shape and conditions, and this is the rationale for using the PBC (and simple cubes or parallelepiped) in most of the cases.
Notice, however, that independence on boundary conditions for a given shape doesn't imply that every boundary condition is acceptable. Indeed, the choice of a boundary condition has deep implications for the domain of the operators corresponding to important observables, particularly momentum and energy.
Conditions of the wavefunction vanishing at the boundary, or PBC, do not result, as often stated, even in many textbooks, from an inexistent requirement of continuity but stem from the fundamental need that the Hamiltonian and momentum operators are self-adjoint.