LM1084 has an internal voltage reference of about 1.25v
By using those 2 resistors , you form a potential divider that feeds 3.75v into the adjust pin instead of 1.25v .. that's how you get 5v out. If you leave the adjust pin unconnected, you'd probably get 1.25v out but the current is not limited so you'd burn the leds.
You can use a resistor on the output and feed what's after the resistor to the adjust pin, this way you feed the voltage drop on the resistor to the adjust pin and limit the current
This should work with LD1084 as well, but you have to keep in mind that as resistor heats up the current changes.. it's not a great, accurate current limiter. LED drivers are much better at this and have enough advantages to be worth buying them and they're not much more expensive.