The problem is here:
HashMap<Integer, HashSet<Integer>> empty_map = new HashMap<Integer, HashSet<Integer>>();
sections.put("A", empty_map);
sections.put("B", empty_map);
You're adding the same object for both A and B keys. So any changes that modify the map associated with A also modify the one associated with B and vice versa.
Think of a situation like this:
You have to create a new object for each key.
sections.put("A", new HashMap<Integer, HashSet<Integer>>());
sections.put("B", new HashMap<Integer, HashSet<Integer>>());
And it outputs:
{A={1=[1, 5]}, B={}}
{A={1=[1, 5], 2=[1, 5]}, B={}}
{A={1=[1, 5], 2=[1, 5], 3=[1, 5]}, B={}}