You have the right idea: a package is just a bunch of precompiled files. They can do some extra work, too. Debian packages (probably redhat.. but I'm not too familiar with RPMs) have the ability to run pre-install scripts and post-install scripts. An example would be to email you that the package is about to be installed and that it is done installing.
The reason a package has dependancies is because the author tries to break the package down into the most maintainable and flexible chunk. This allows you to mix and match with packages.
Lets take openssl for example. You can install the openssl rpm and now have the ability to use openssl (logically). Now lets say you download a tar.gz file that you are going to compile yourself. In order to compile it, it needs the openssl header files. Those are stored in the openssl-devel package. So now you need to install that beforehand. Why split them into two parts? Cleanliness, space, security: if you don't need the devel files, why have them on your system? If an intruder breaks into your system, why give him access to files he doesn't need?
Here's another example on dependancies: Lets say you want to install gaim. Gaim is a GUI application that relies on GTK. You don't have GTK on your computer. When you install gaim, it complains that you don't have GTK. "Screw it, I'll just force it!" So you run
Code:
rpm -Uhv --nodeps --force gaim.rpm
And it forcefully installs gaim. So now you have the (precompiled) gaim files on your computer. When you start the program, it gets furious. "Whoa.. where's GTK at?" and dies. So now you definitely need to install GTK to calm Gaim down.
The obvious solution would be to package Gaim and GTK up together since they go hand in hand. But now you've just made your package bigger. And lets say a security fix comes out for Gaim. That means you need to get a new Gaim+GTK bundle. And what about GIMP? He needs GTK too. So are you going to bundle GIMP+GTK? What about Gaim? Now you've got GIMP+GTK and Gaim+GTK. If one author of the package decided to use an older version of GTK than the other.. you can't have both programs on your computer since you're only allowed 1 GTK (well.. there are ways.. but no.. don't do it..).
Hope that helps a bit