He retains about a billion shares to get the dividends I believe. He isn't selling "all his shares", probably ever. He obviously has been buying them over the years.
When I look for bonds MSFT are AAA, none better, maybe better than treasuries. Dying companies don't have that.