It's annual inspection time. Once every 12 months, a privately owned aircraft in the United States must under go a detailed safety inspection, just like a car in most states.
Of course, it's a much more detailed and lengthy inspection, especially for an aircraft that the shop you choose hasn't seen before and has no history with. That's the case with my Bonanza, which has been laid up in the hangar for 3 weeks and counting. All the insides are outside, it's up on jacks so that the shop can test the retractable gear, and all the spark plugs are out (all 12). The shop also has to check and make sure that all applicable FAA Airworthiness Directives (ADs) have been met, which can take some time on a 45 year old airplane.
Commercial aircraft undergo a similar check, but since they fly more, they must be inspected every 100 hours of flight. I've flown my Bonanza nearly 80 hours since last April when I bought it - slightly higher than the average private airplane, but not much. Airliners typically have A, B and C checks - the C check happens on the ramp and takes very little time. The A check means putting it in a hangar for a week or two, and stripping it down, often replacing engines and other major assemblies.
The annual is also time to take care of those niggling "squawks" that you list as the year goes on - internal lights that won't work and can't be fixed simply, small brake fluid or fuel or oil leaks, things not big enough to warrant immediate attention, but that need to be fixed. So my airplane has been "out of service" for for 22 days and counting. Thank goodness I'm instructing, or I would have been grounded for almost a month.
But I want my baby back........