Resizing often means allocating a bigger table and rehashing/copying all entries, which is O(n) work done at once. That can create a pause and a latency spike. Mitigations: pick a good load factor, pre-size when you know the size, use incremental rehashing (move entries gradually), or use a concurrent map implementation that spreads the work.
Expanding on the short answer — what usually matters in practice:
A tiny example (an explanation template):
// Example: discuss trade-offs for "why-can-a-hash-table-resize-cause-latency-spikes"
function explain() {
// Start from the core idea:
// Resizing often means allocating a bigger table and rehashing/copying all entries, which is
}