Because you have used muscles that don't get a lot of work. The more time that you work out and the pain will go away as the muscles strengthen. They might hurt now, but soon they get strong and no more pain!
Don't forget to stretch properly before any workout session. That, and keeping properly hydrated will help keep you from becoming sore the next day; It also depends on the amount of inactivity for the muscle group in question, but like the other fellow mentioned, the more you exercise the less likely you will be for soreness the following day.