If I generate much keys would all be valid.
But when i tested some thousands all are valid.
This is not a weakness and you have not found some big security flaw. This is exactly how bitcoin is supposed to work.
Anyone in the world can generate thousands of even millions of valid private keys if they want. It's as simple as starting at 1 and counting up. Pick any number between the two numbers in BlackHatCoiner's reply, and you have found a valid private key. The reason you can't find anyone else's coins is because of the sheer size of that second number. Even if every computer on the planet did nothing but grind private keys for the rest of time, the sun would die and humans would be extinct before you found a collision.