häçking, in general, is a form of s†éáling. Whether one's intention is good, it is considered a crime, hence not okay.
With the exception, we have white hat häçkers today whose main purpose is to look for vulnerabilities in gaining unauthorized access, with very clear consent to do no harm, and reinforced the system(s) they're to häçk. These could be the okay-häçkers we can consider, doubtly speaking.
There is a saying in the häçking world which is so ironic that ''you couldn't be that great white hat if you had no experience of being black hat''. And because of this, white hats are virtually non-existence. Most are either gray or black hats.
So as for those who are saying for educational purposes only, just make sure you have consent when doing the activity because anything that is non-consensual is considered a crime, regardless your intention is good.