Relatives are not prevented from visiting them. It just seems that blocking communication is extreme. This is an added punishment like introducing legislation retrospectively. When people committed crimes that led to incarceration they had no idea that they would be cut off from the outside world in such a draconian way.
It is known that some criminals use mobile phones to continue crime on the outside. But is this grounds enough to stop communication for everyone in prison? Clearing prisons of mobile phones is an ongoing problems with hundreds of them being confiscated each year. When jamming is used it stops emergency calls getting through. And ordinary citizens in the community close to a prison will be blocked as well.
It seems to be a "knee-jerk" reaction to solve a perceived problem. Many government sponsored initiatives appear to be silly "after the fact". This is another one that fits into this category.
Law by Ty Buchanan