Question: why was the battle of Palmito ranch fought even through confederate armies in the east had surrendered
Answer: On May 13, 1865, more than a month after the surrender of Gen. Robert E. Lee, the last land action of the Civil War took place at Palmito Ranch near Brownsville. Barrett, reported to his superiors that his base was secure from attack and that with permission he could take Brownsville.
Hope this helps! Have a wonderful day!