Another feature of quartz: Over long periods and especially at high temperatures and/or high pressures, it is very slightly soluble. Not that you would notice. The sand isn't going to dissolve beneath your feet, but every litre of surface water contains a few milligrams of dissolved quartz as silicic acid, which takes part in a whole catalogue of geological processes. In addition, there are many other rocks besides granite which yield quartz grains, including quartzite, weathered pre-existing sandstone, schist, gneiss, and some intermediate rocks (complex chemistry between granite and basalt. Even limestone - rocks that are generally thought of as 'pure' calcium carbonate, generally have a percent or two of insoluble residue, of which quartz is the dominant component.