"what exactly is the purpose of setUp() method in Junit that runs before each test case ?"
If a shared resource e.g. a fake persistent store, is used by each test case, you'll need to ensure it's in the same state at the start of each test.
Otherwise, if you don't initialise a store in that way and your tests (with the naming convention: MethodUnderTest_Condition_ExpectedBehaviour) execute in an order, say:
then test 2 depends on test 1 adding the object to the store and is no longer a proper unit test. If they run in a different order, the working code of GetObjectById() will fail the unit test, giving a false negative.
Good Unit tests do not have a required order to be run.
"this dependency may cause large number of test cases to fail if something changes ."
That's a good thing, those unit tests each test something different, and will fail appropriately. If it's a small change that caused them to fail, it will be a small fix that will make the tests pass again.