The functional style eliminates types of bugs that can happen with for loops and makes the code easier to read. For example, consider the task of removing names that start with "B" from a list. This is the for loop way:
List<String> names = Lists.newArrayList("Alice", "Tom", "Bob", "Brandon", "John", "James", "Ben");
List<String> bNames = new ArrayList<>();
for (String name : names) {
if (name.startsWith("B")) {
bNames.add(name);
}
}
names.removeAll(bNames);
And the functional way: names = names.stream().filter(name -> !name.startsWith("B")).collect(Collectors.toList());
The basic problem with the for loop is that you need create a temporary list to do the work. It's low level coding that requires telling the computer exactly where to put the temporary results, then what to do with it. I've seen bugs where developers accidentally return the wrong list (such as bNames in this example) or later modify the wrong one. When the code becomes more complicated, there's often a lot of these temporary variables that greatly reduce code readability and allow subtle bugs to occur.