I think Lego produces a higher quality product and has clearly put more thought into collector and kid functionality. The Death Star is a fantastic example of a great collectible with dozens of moving parts and play features for kids. That said, I still think figures have a much broader appeal than lego sets. In fact, most of the Lego collectors I know are more concerned about the mini-fugres than the ships and playsets.
Hasbro and Lego have numerous lines outside of Star Wars, but strictly from a Star Wars perspective, Hasbro's had literally nothing available for multiple years now. Quality differences, product design, profit margin, etc. doesn't really matter when you aren't putting product on the shelf. It's not like Lego suddently changed their gameplan - they've had the same quality product out for a long time now. The reason that they're kicking Hasbro's butt is simply making cool stuff available to the consumer through their site, their owned stores, and through pretty much every retailer possible.