Just took my Bio AP exam. Got an A in that class. I think I'm well enough qualified to talk about this.
Do you know what DNA is?
Do you know how it replicates?
Do you know how it controls and codes for basically all the components of a cell?
Do you know why it has the knooks and cranies? JUST to ensure that the DNA itself is passed on indefinitely.
Why? Hell if I'd know. As far as I know, we don't have a solid theory on why exactly it "wants" to "live" on. Quotes because DNA itself is not alive, and therefore doesn't want anything. If anyone knows, please correct me.
I'm assuming your "looks random" was sarcastic. Guess what? It still is.
All sorts of atoms are constantly flying around. Sometimes because of environmental conditions, they bond in a certain way.
When this happens, you have what are called "emergent properties". These are new properties of the molecule as a whole that atoms individually don't have.
Then the chain just goes down. Randomness seemingly turns into specific instructions. Then you have things like phospholipids. These babies make up the membranes of the cells; wanna guess their emergent property? Selective permeability. They can react to certain molecules and ions, and react accordingly to either let them in, or keep them out. This is all the random bumping of atoms everywhere. Either it bonds to something and does something, or it doesn't.
DNA codes for it; it makes proteins and such that react to specific things, things that other proteins may not react to. This way, it seems like a cell is "instructed" to do something by sheer intelligence. Nope. Simple cause and effect, whose variety is powered by randomness, allowing a cell to do seemingly endless tasks, as if intelligently instructed.
Beautiful example: Photo respiration. In plants, there is this little enzyme called Rubisco. In the Calvin cycle, it is essential in carbon fixation. Anywho, sometimes it randomly picks up O2 (oxygen), instead of the usual CO2 (this actually happens more than you think). What does this do? Waste one ATP and one NAD(PH). Just a waste.
Why? Because oxygen fits into the enzyme too. Instruction? Randomness.
My favorite part is the motor protein. Power by ATP and pulling the vesicles all throughout the cell to make sure it stays alive.
Why? To pass on DNA.