If you hold certain items in your main hand that have right click actions that are unable to successfully perform the action, items in your offhand will not attempt to be used.
Possibly related to
Sugar Cane in the main hand and a Torch in the offhand.
Right click on a block where Sugar Cane cannot grow. The Torch is not placed. If the mainhand has something without a right click action, e.g. a pickaxe, the Torch is placed.
Flint and Steel in the main hand and a Water Bucket in the offhand.
Right click on the top of a solid block directly under a fence. The Water is not placed in the Fence. Like above, if the mainhand has something without a right click action, then the Water is placed.
A block with a collision box in the main hand and a Shield in the offhand.
Try to place the block such that the block's collision box would intersect with the Player or another living entity. The player does not raise the Shield.