Think: how much overhead, one function has in terms of the CPU calling it, then returning it.
How many 1000s of X more are you adding by making that a function inside another webserver.
Yes, there are times when a microservice is correct, there are many-many-many other times where using them is pure waste.