1st of all, that ain't exactly correct. For example, the algorthim for Rijndael is published publically, and you can download source code versions to create your own implementation. Yet Rijndael (usually pronounced "Rhine Dahl" or "Rain Doll" is now the official Advanced Encryption Standard of the United States, having replaced the previous standard, DES or triple-DES.
Rijndael uses a 256 bit key, whereas DES used a 168 bit key. Go here for a C++ implementation of Rijndael. Go here for a bunch of Rijndael info, including other programming language implementations.
You are basically making an argument for "security by obscurity". I won't say that the argument is invalid, but I will say that many security experts do not agree with it. Now you may disagree with them but your opinion is not a consensus opinion even in the security field.
Basically, because it is an important element of security. Just not in total, because nothing is ever completely "obscure".