I think IP statutes, whether it is the Patent Act or the Copyright Act, do give some space for private study and research. Research exemptions under the Patent Act can allow for this type of basement hacking. Definitely the commercial exploitation of that hacking would be off-limits.
In the field of AI, we're lucky that we're really in the world of open source software. It's a very collaborative community. Ideally we can tinker out in the open and learn from that and share that knowledge with everyone else. That's a bit of a counterpoint to the basement analogy.