when right clicking items in crafting or inventory to place the items into a slot a random number of items from that stack ranging from 2-13 (higher numbers are more infrequent) are sometimes placed. It is of note that this does not occur all the time but seemingly at random. The problem also extends to placing blocks in survival.
Get a better quality mouse. It sounds to me like the right mouse button itself is 'bouncing' (causes multiple click signals to be sent from one actual press), too close together for most things to notice, but distinct enough for Minecraft.