XyzUtil.setPersistence and setService has not been used since 4.x. We no longe set the service from Spring but we look them up as we need them. Allowing someone to set it can also be dangerous because the other injected references may be different from the one that is set.
For example, if we overwrote UserLocalServiceUtil.setService, that does not mean that GroupLocalServiceImpl's injected reference to userLocalService is changed. If you want to modify it, use a hook.