The GPL imposes conditions on your use of the code / program, as does the MIT License. If you don't follow the conditions then you do not have a license to use the program / code & are open to claims of copyright infringement.
You might choose to ignore the licenses on the code you use, but it certainly isn't a great idea in a commercial context (and in your personal projects probably just a moral dilemma). Although, sadly, I'm not sure any of the many public GPL violations have really "cost" the companies that did them all that much.
Edit: I guess you're saying, yes, you can just go ahead and use it. Which I guess is the position large LLM training corpuses have taken ..
No, they impose restrictions on your redistribution of the program. (And derivative works)
Which is why it's always been silly to present something like the GPL as an EULA in installers, for example.
The open source definition requires no discrimination against fields of endeavour.
If you place restrictions like this in the license it no longer meets the definition of open source.
You can obviously license things however you want, but you cant also claim its open source.
By default (in the US) you are not permitted to copy someone else's work (with some exceptions for "fair use") without the copyright holders permission.
Software copyright holders generally give you a copy of their software only if you agree with their terms (it's a contract agreement, or license. Their terms usually bind you to not use the software in certain ways and to not make any copies of the copy you have been given. If you break that contract then you have no permission to have a copy of the software and you are in violation of copyright law.
None of the Open Source licenses restrict how you use the software. If you create your own license that does restrict use then by definition it is not an Open Source license. Open Source licenses do put restrictions on copies you make and distribute (some licenses impose more restrictions than others).