It is legal to practice hacking public websites as long as you are a student learning about cybersecurity.
When you check the box on a company privacy policy they can legally use your data & information in any way disclosed.
Code HS