Mechanisms of strange nonchaotic attractors in a nonsmooth system with border-collision bifurcations