Basics
You said, "...I would like to understand why is so much money spent on racing sails, lines and equipment when the competitive edge gained should be neutralized by an updated handicap penalty." It's a fair question to ask, and the answer has been touched on by previous respondents: Usually, handicaps are assigned to specific models of boats, not to individual boats. Then every boat of that model will have the same basic handicap, at least in that geographic region or local racing authority. Some additional equipment can push that handicap up or down - for example, adding a folding prop will lower the handicap, but adding a roller furled headsail will increase it. Many go-fast(er) modifications do not usually affect the handicap either way - for example, having line-adjustable genoa cars on tracks. It is assumed that a given handicap assigned for a specific boat model represents the capability of that boat in well-prepared condition and sailed by an experienced and capable crew. However, since handicaps are also assigned and modified based on past performances of the given model, faster, hotter boats are more likely to have had more capable crews. Thus, the handicap assigned to a slow family cruiser is inevitably going to reflect the fact that on the average it is usually not crewed to the same level of expertise. So a great crew on a "slow" boat can sometimes beat a so-so crew on a "fast" boat when their times are adjusted for handicaps. Additionally, weather conditions come into play - some boats tend to do their best in heavy air, others perform better in lighter conditions. You also said, "I have also observed from race results that well equiped boats usually win the races with very rarely an entry level boat being the winner. Is the equipment making the difference or it just happens that the swiftest crews usually race on well equiped boats?" It doesn't "just happen" that good crews are found on fast boats. Part of good skippering is recruiting and attracting good crew, especially in the hotter and more competitive classes. Another part of good skippering is making sure the boat is prepped out - you will find that the winning boats usually don't have extraneous weight on board, do have smooth, clean, fair bottoms and underwater foils, do have small modifications that make maneuvering, trimming, etc. more efficient, do have the rig tuned very specifically for the conditions, do have weight distributed properly, and so on. AND, perhaps just as important as any other factor, the skipper and crew have experience. They understand good race strategy and tactics and are always trying to learn even more. An entry level boat that has so-so sails, a bottom that hasn't been cleaned for a while, a crew that isn't too focused, a rig that is tuned "about right", extra gear (weight) on board, and a skipper who figures that stuff doesn't make much difference anyway and doesn't pay much attention to wind shifts is very unlikely to run up front unless the competition is the same or worse.