Iron golems created from commands are semi hostile. They attack players if attacked themselves but not when players attack villagers.
Natural golems attack in either situation and made golems don’t. That is normal still.
Comments 4
This is intended. If you wan't to make them part of a village do this command in a village:
/summon iron_golem ~ ~ ~ minecraft:from_village
the bug here is that the summoned golem is in in-between state, neither like built nor like spawned by villagers
Thank you for your report!
However, this issue has been closed as Working as Intended.
Remember not all differences between game versions/platforms of Minecraft are bugs. If you need help or have a suggestion you might like to follow a link below.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
that isnt a bug i think. Made golems don't belong to the village, so they don't care about villagers