1. The pyramids are a pure sidequest/bonus area. I assume you have already found the key for the blue chest? Otherwise, see answer 2. The key for the little door in the temple to the right is hidden very well, search around the room where you found the death mask (but you don't really need it, you can get another bonus item from there)
2. You'll have to steal the star if you want to get the key for the blue chests. There's no real reason not to steal it. To get the star, pull on that open crate sitting on top of a shelf in the palace's cellar.
3. The lottery is practically impossible to win (just like a real-life lottery
), but maybe you met someone on the way who offered to look into the future for you? (there was a fortune teller back in Darnis).
Strictly speaking, you don't have to win the lottery to get the money, but from a rough calculation, you'd have to fight tigers for about 3 years, playing 12 hours a day - so going back to Darnis and asking the fortune teller is definitely the easier solution