Purpose of the bsp_display_lock function

Why do I use bsp_display_lock?
Do I have to use it?

This is because LVGL is not thread-safe (has a single-threaded design) and this lock function turns a mutex on while LVGL functions are called, so possible race conditions on common resources (variables) by using LVGL from code with threads, are avoided.

What will happen if I don’t use this function?

If you don’t use it you might call lv_timer_handler() or other LVGL function from a different thread while an lv_timer_handler() ar other LVGL function is already running. That could cause a modification of a common resource/variable that the not-yet-finished lv_timer_handler() or other LVGL function is using inside (relying on its current value), potentially leading to unexpected results.

Is the unexpected result not a rebooting with panic in case of ESP32?
Or, is it a malfunction of the UI on the screen?

Unwanted race conditions can cause very different problems depending on the scenario, maybe sometimes even undetected ones.