I was doing a iron farm with my two villagers and too breed them but they act strange I don't what is happening.
but I have a theory it's like when you travel with them like 1,000 of blocks they do that and if you don't break the bed or work station they will go there no matter what even water like I travel them with boats and destroy the boats and they go in there home and if you trying to link a workstation they don't even with bed.
And I'm pissed I kill it and I will send another glitch when you travel with them in the nether.
The villagers are linked to beds that are not shown in your video. You need to destroy those beds to unlink them.
What you are dealing with is a gameplay issue and not a bug. Please seek help from a Minecraft player community, as the bug tracker staff are not able to provide gameplay support.